Disclosure

Dark Mode
Accessibility

A disclosure shows and hides one section of content.

API Reference

Prop
Type
Default
Description
summary
React.ReactNode
children
React.ReactNode
data-test
string
defaultExpanded
boolean
false
mode
'compact' | 'normal'
normal
unmountOnCollapse
boolean
false

Examples

Default

Default expanded

Custom summary

Summary action

Put controls that must be next to the summary inside

summary
. These controls must stop the click event from propagating to the summary wrapper. The chevron stays at the right edge and is part of the clickable summary area.

Advanced

Compact mode