Provides a collapsable container
npm install @polymer/iron-collapse


iron-collapse creates a collapsible block of content. By default, the contentopened or toggle() to show/hide the content. Theiron-collapse adjusts the max-height/max-width of the collapsible element to show/hide
the content. So avoid putting padding/margin/border on the collapsible directly,
and instead put a div inside and style that.
``html
Content goes here...
`
The following custom properties and mixins are available for styling:
| Custom property | Description | Default |
| --- | --- | --- |
| --iron-collapse-transition-duration | Animation transition duration | 300ms |
See: Documentation,
Demo.
npm install --save @polymer/iron-collapse
`$3
`html
Content goes here...
`
$3
`js
import {PolymerElement, html} from '@polymer/polymer';
import '@polymer/iron-collapse/iron-collapse.js';class SampleElement extends PolymerElement {
static get template() {
return html
;
}
}
customElements.define('sample-element', SampleElement);
`Contributing
If you want to send a PR to this element, here are
the instructions for running the tests and demo locally:$3
`sh
git clone https://github.com/PolymerElements/iron-collapse
cd iron-collapse
npm install
npm install -g polymer-cli
`$3
`sh
polymer serve --npm
open http://127.0.0.1:/demo/
`$3
`sh
polymer test --npm
``