Disclosure
On this page
Style
A disclosure is a container that includes a caret icon and a text label, similar to an Accordion panel. When expanded, some styles are added for emphasis.
Anatomy
- Caret icon
- Title text
- Container
- Thick border
- Box shadow
Variants
Box
The box variant, which is the default style, shows a border around the entire disclosure in all states. A thicker accent border appears on the left when it’s expanded.
Borderless
The borderless disclosure omits the border and uses --rh-color-interactive-primary-default for the title text for improved interactive affordance.
Sizes
The style variants come in both sizes.
Default
Compact
The compact size reduces the font size of the title text and amount of padding around it.
Color scheme
Light scheme
Dark scheme
Configuration
A disclosure includes two parts, a trigger that the user selects and the container that opens and discloses the content.
Nested disclosure
Only one additional disclosure can be nested to help organize content better. If you need to use more disclosures, use an Accordion instead.
Space
A disclosure’s spacing is affected by whether they are the default or compact size. A box and a borderless disclosure used at the same size have the same spacing.
Spacing when disclosures are collapsed
Spacing when disclosures are expanded
Spacing when disclosures are nested
Interaction states
Hover
The entire trigger button surface changes color on hover.
Focus and Active
A focus ring wraps around the entire trigger button in both focus and active states.
Other libraries
To learn more about our other libraries, visit this page.
Feedback
To give feedback about anything on this page, contact us.