# @forter/collapse

> Collapse from Forter Components

Latest version **4.0.7** (published 2020-04-06) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @forter/collapse
pnpm add @forter/collapse
yarn add @forter/collapse
bun add @forter/collapse
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 4.0.7 |
| Published | 2020-04-06 |
| First published | 2019-03-17 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 63.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Forter Developers |
| Maintainers | forter-npm, lirown, oweingart |
| Keywords | web-components, custom-elements, lit-element, lit-element-2.x |

## Links

- npm: https://www.npmjs.com/package/@forter/collapse
- Repository: https://github.com/forter/web-components
- Homepage: https://github.com/forter/web-components#readme
- Issues: https://github.com/forter/web-components/issues
- npm.io page: https://npm.io/package/@forter/collapse

## Dependencies (3)

- [lit-html](https://npm.io/package/lit-html.md) ^1.1.0
- [lit-element](https://npm.io/package/lit-element.md) ^2.1.0
- [@forter/core](https://npm.io/package/@forter/core.md) ^2.0.5

## Recent versions

- 4.0.7 (latest) — 2020-04-06
- 1.0.1-beta.312 (next) — 2019-06-24
- 1.0.0-alpha.0 (canary) — 2019-03-17
- 4.0.6 — 2020-04-06
- 4.0.5 — 2020-02-05
- 4.0.4 — 2020-02-04
- 4.0.3 — 2020-01-15
- 4.0.2 — 2020-01-10
- 4.0.1 — 2020-01-07
- 4.0.0 — 2019-12-08
- 3.0.4 — 2019-12-05
- 3.0.3 — 2019-11-27
- 3.0.2 — 2019-09-19
- 3.0.1 — 2019-09-16
- 3.0.0 — 2019-09-02
- … 15 more at https://npm.io/package/@forter/collapse/versions

## README

# fc-collapse

Provides a collapsable container
<!-- Author: Benny Powers <benny.powers@forter.com> -->

## Usage

```html
<script>
   import '@forter/collapse';
</script>

<fc-collapse>
<fc-button slot="toggle" \@click="${toggle}">Toggle</fc-button>
    <ul>
      <li>Vertically</li>
      <li>Collapsed</li>
      <li>Content</li>
    </ul>
</fc-collapse>
```

## Properties

| Property     | Attribute    | Type          | Default | Description                        |
|--------------|--------------|---------------|---------|------------------------------------|
| `container`  |              | `HTMLElement` |         | The container element              |
| `contents`   |              | `HTMLElement` |         | The contents element               |
| `horizontal` | `horizontal` | `boolean`     | false   | If the collapse opens horizontally |
| `opened`     | `opened`     | `void`        |         |                                    |

## Slots

| Name | Description         |
|------|---------------------|
|      | collapsible content |

## CSS Custom Properties

| Property                           | Description                                      |
|------------------------------------|--------------------------------------------------|
| `--fc-collapse-animation-timing`   | animation timing for the collapse. default: `0.3s` |
| `--fc-collapse-container-overflow` | container's overflow. default: `hidden`          |

---
_Source: https://npm.io/package/@forter/collapse · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
