Components
Collapsible
An interactive component that expands and collapses a panel of content.
@mijn-ui starred 3 repositories
@mijn-ui/react
Installation
npm install @mijn-ui/react-collapsibleimport { Collapsible, CollapsibleContent, CollapsibleTrigger } from "@mijn-ui/react-collapsible"<Collapsible>
<CollapsibleTrigger>Toggle</CollapsibleTrigger>
<CollapsibleContent>Collapsible content</CollapsibleContent>
</Collapsible>API Reference
Collapsible is a thin wrapper around Radix UI Collapsible, so all of its props are forwarded to the underlying primitives.
| Prop | Type | Default | Description |
|---|---|---|---|
defaultOpen | boolean | false | The open state of the collapsible when initially rendered. |
open | boolean | — | The controlled open state. |
onOpenChange | (open: boolean) => void | — | Event handler called when the open state changes. |
disabled | boolean | false | When true, prevents the user from interacting. |
className | string | — | Additional classes for the component. |
See the Radix Collapsible API for the full prop list of each part.