Details
The Details component is an expandable panel for showing and hiding content from the user to make the UI less crowded.
Anatomy
Details consists of a summary and a content area.
Summary
The Summary is the part that is always visible, and typically describes the contents, for example, with a title. Clicking on the summary toggles the content area’s visibility.
The summary supports rich content and can contain any component. This can be utilised for example to indicate the status of the corresponding content.
Theme Variants
Details has three theme variants: filled
, small
, and reverse
.
Theme variants can be freely combined with each other.
For example, all three themes variants can be applied to the same Details component.
Filled
The filled
theme variant makes the component’s boundaries visible, which helps tie its content together visually and distinguishes it from the surrounding UI.
Reverse
The reverse theme variant places the toggle icon after the summary contents, which can be useful for visually aligning the summary with other content.
Best Practices
Use Details to group related content and to lessen the risk of overwhelming the user with information. However, avoid putting important information in a Details component unless it is expanded by default. Otherwise, the user might not notice it.
Details can be used instead of Accordion if there is a need to see content from multiple collapsible content areas simultaneously.