Collapsible
An interactive component which expands/collapses a panel.
Features
- Full keyboard navigation.
- Can be controlled or uncontrolled.
Install the component from your command line.
Import the components and piece the parts together.
Create your styled collapsible component from the primitive parts.
Contains all the parts of a collapsible.
Prop | Type | Default | Required |
---|---|---|---|
as | enum | div | |
defaultOpen | boolean | ||
open | boolean | ||
onOpenChange | function | ||
disabled | boolean |
The button that toggles the collapsible.
Prop | Type | Default | Required |
---|---|---|---|
as | enum | button |
The component that contains the collapsible content.
Prop | Type | Default | Required |
---|---|---|---|
as | enum | div | |
forceMount | boolean |
Adheres to the Disclosure WAI-ARIA design pattern.
Key | Description |
---|---|
Space | Opens/closes the collapsible. |
Enter | Opens/closes the collapsible. |