layout/@mihcm/ui·v0.21.0·stable
Accordion
Vertically stacked collapsible sections. Supports single (one open) and multiple (any number open) modes with animated height transitions.
Props
The full prop API for Accordion. Same surface in web and React Native — bundlers pick the right variant via the react-native export condition.
| Prop | Type | Default | Description | Since |
|---|---|---|---|---|
type | 'single' | 'multiple' | 'single' | Single allows one open section; multiple allows any number. | 0.5.0 |
variant | 'default' | 'bordered' | 'flush' | 'default' | Visual style. default = bottom-bordered, bordered = card-style, flush = minimal. | 0.6.0 |
defaultValue | string | string[] | — | Value(s) that should be open initially. | 0.5.0 |
duration | 'fast' | 'normal' | 'slow' | 'normal' | Motion speed: 300ms, 500ms, or 700ms with smooth easing. | 0.10.1 |
value | string | — | Unique identifier for the accordion item. On AccordionItem. | 0.5.0 |
disabled | boolean | false | Disables the item trigger. On AccordionItem. | 0.5.0 |
className | string | — | Additional Tailwind classes; merged with tailwind-merge. | 0.5.0 |
Import
import { Accordion, AccordionItem, AccordionTrigger, AccordionContent } from '@mihcm/ui/Accordion';