# XWUICollapse

An animated expand/collapse container that smoothly transitions its content's height in and out. Drive it imperatively with `expand()`, `collapse()`, `toggle()`, or `setExpanded()`, swap the body via `setContent()`, and tune the motion with the `duration` and `easing` config options. Set `destroyOnCollapse` to drop the content from the DOM while hidden.

## Basic Usage

A collapse container created with default config (initially collapsed), ready to be toggled.

```example
file: examples/BasicUsage.ts
html: examples/BasicUsage.html
title: Basic Usage
description: An animated expand/collapse container created with default options.
```

## Toggle panel

A button animates a content panel open and closed via `toggle()`.

```example
file: examples/Toggle.ts
html: examples/Toggle.html
title: Toggle panel
description: Show/hide a content panel with an animated toggle.
```

## Start expanded

Begins open with `expanded: true` and custom easing; a button collapses and expands it.

```example
file: examples/StartExpanded.ts
html: examples/StartExpanded.html
title: Start expanded
description: Initially expanded with a custom 400ms easing.
```

```api
```
