Component
A multi-item show/hide component. Use the convenience wrapper with an items array, or compose manually with Root, Item, Trigger, and Content.
View component changelogImport all parts of the component and piece them together
The root Disclosure container.
| Prop | Type | Default |
|---|---|---|
items | { title: string, content: ReactNode }[] | -- |
className | string | "" |
loop | boolean | true |
| Shortcut | Description |
|---|---|
Tab | Moves focus to the active Disclosure.Trigger in the trigger group. |
Space | Toggles the focused item open or closed. |
Enter | Toggles the focused item open or closed. |
ArrowRight | Moves focus to the next trigger. In RTL direction, moves focus to the previous trigger. |
ArrowLeft | Moves focus to the previous trigger. In RTL direction, moves focus to the next trigger. |
Home | Moves focus to the first enabled trigger. |
End | Moves focus to the last enabled trigger. |
| Reference | What Rad UI follows |
|---|---|
Uses disclosure-style button triggers with aria-expanded state and region content for each revealed panel. | |
Exposes the root, items, and opened content as regions so composed multi-item disclosures can be labelled by consumers. |