Accordion
A compound component for showing and hiding sections of content, supporting single-item and multi-item expansion modes.
Installation
npx dafink-ui add accordionDemo
A React component library you install source into, not a runtime package.
Composition
<Accordion>
</Accordion>
Props
| Name | Type | Default | Description |
|---|---|---|---|
| type | "single" | "multiple" | "single" | Whether one or many items can be open at once. |
| defaultValue | string | string[] | - | Item value(s) open on initial render. |
| collapsible | boolean | false | When type is single, whether the open item can be collapsed by clicking again. |
| className | string | "" | Additional classes on the root div. |