On this page
Overview
Show code, VisibilityHelp.tsx
Anatomy
Summary
Panel
Show code, DisclosureAnatomy.tsx
Behaviour
Find in page
Finding text in a closed disclosure's details opens it, where the browser supports it.
One at a time
Disclosures in a set can open one at a time, where the browser supports it.
Show code, FrequentQuestions.tsx
Open on an error
The application can open a disclosure itself, such as when a field inside has an error.
Show code, OpenOnError.tsx
Rules
A disclosure hides only what most people don't need, one level deep.
Use it when
- Optional guidance most people don't need, such as how a setting works
- Settings most people leave alone, such as advanced options
Show code, OptionalHelp.tsx
Show code, HiddenRules.tsx
One level
Don't put a disclosure inside another.
Accessibility
| Key | Action |
|---|---|
| Tab, Shift+Tab | Moves to the summary, then into an open panel. |
| Enter, Space | Opens or closes the panel. |