@3mo/expand-collapse-icon-button
v1.0.4
Published
A web component for chevron icon buttons that rotate to show whether something is expanded or collapsed.
Readme
Expand Collapse Icon Button
A web component for chevron icon buttons that rotate to show whether something is expanded or collapsed.
A dense chevron icon-button that turns upside down while the content it controls is open.
Installation
npm install @3mo/expand-collapse-icon-buttonimport '@3mo/expand-collapse-icon-button'Usage
<mo-expand-collapse-icon-button></mo-expand-collapse-icon-button>Examples
- Toggling — The button only shows the state, turning its chevron when
openchanges; flipping it onclickis up to you. - Disabled — A disabled button fades in either state and ignores presses.
API
mo-expand-collapse-icon-button
Properties
| Name | Attribute | Type | Default | Description |
| --- | --- | --- | --- | --- |
| disabled | disabled | boolean | false | Disables the button. |
| open | open | boolean | false | Whether the controlled content is open, which turns the chevron up. |
Links
License
MIT © 3MO GmbH
