Panels

Lightweight containers that optionally collapse their content.

Panels are used for lightweight viewing or editing of content. They can be used in longer forms to group similar content. There is some overlap between cards and panels, but a panel includes a freeform content pane, whereas cards are typically shown in groups with one focused topic and associated action per card. In addition, cards often use imagery to enhance their appearance whereas panels optionally include a simple icon to represent the topic.

Basic Panel

The core components of a panel are a single line header and some detailed content. For example, a data table in an application's dashboard.

At minimum, panels include a PanelHeader and a PanelContent component.

Collapsible Panel

A collapsed panel displays summary information. Interaction with the panel header toggles the visibility of the panel content.

Collapsible Panels may be displayed in a sequence to form creation flows. Steps in the process are contained within the panels.

To enable Collapse on the PanelContent, pass the enableCollapse prop.

Default the panel state to open by passing the expanded prop.

Panel Icon

A visual representation of the panel contents.

An icon component or svg may be passed in the icon prop.

Note: If the icon is necessary to understand the panel contents in addition to the panel title, include the iconLabel prop, ex: iconLabel="Review details".

Header Customizations

Title Variant & Hierarchy

Define titleVariant as any valid <Typography> variant to customize the title style.

The default title element rendered is <h4>. Use the titleComponent prop to correct the semantic hierarchy as needed for the document outline. For example, if the panel follows an <h2> headline, set titleComponent="h3".

Secondary Title

Optional secondary title that can be utilized within the Panel Header.

Custom Palette

Pass a custom backgroundColor and/or color to <PanelHeader> for re-enforcing status as for workflows.

Extended Header

Add any nodes as children to <PanelHeader> to display an extended header, which will remain visible when the panel is collapsed and be included if a custom palette is provided.

Uncontained

Remove the contained, raised appearance by passing the <Paper> prop of elevation={0}. Useful for scenarios such as the controlled accordion.

Controlled Accordion

Useful in cases where flows have dependencies or where users should focus on the content of one panel at a time.

The following demonstrates how to leverage onToggle() to control the expanded state to create an accordion panel.

Properties