Layout/Collapsible
Collapsible
A standalone expand/collapse section with a spring-animated height transition and rotating chevron indicator.
import { Collapsible } from "@animui/ui"Basic
Animui is an animated React + Tailwind component library.
Controlled
Props
| Prop | Type | Default | Description |
|---|---|---|---|
trigger | React.ReactNode | — | Content rendered in the clickable header, next to the chevron indicator. |
children | React.ReactNode | — | Content revealed when expanded. |
open | boolean | — | Controlled open state. |
defaultOpen | boolean | false | Initial open state when uncontrolled. |
onOpenChange | (open: boolean) => void | — | Called whenever the open state changes. |
className | string | — | Additional classes for the wrapper. |
Accessibility
- ✓Trigger is a real
buttonelement, focusable and keyboard-activatable. - ✓Exposes
aria-expandedreflecting the current open state.