A multi-item show/hide component. Use the convenience wrapper with an items array, or compose manually with Root, Item, Trigger, and Content.
import Disclosure from "@radui/ui/Disclosure"- Several show/hide items from an items array, or composed from Root, Item, Trigger and Content
- Each trigger carries aria-expanded and aria-controls
- forceMount keeps closed content in the DOM for transitions
Import 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 |
|---|---|
| Disclosure pattern | Uses disclosure-style button triggers with aria-expanded state and region content for each revealed panel. |
| Region role | Exposes the root, items, and opened content as regions so composed multi-item disclosures can be labelled by consumers. |