A Panel wraps related content, sometimes separated by borders, within a minimally-styled container.
The component can be imported via:
A Panel component can be composed with the following child components:
PanelHeader
PanelTitle
PanelHeaderPanelDescription
PanelHeader after the PanelTitlePanelFooter
PanelActions
PanelHeader or PanelFooterPanelSection
PanelHeader
and PanelFooter use this component, which sets the correct paddings and
is responsible for adding borders between sections.PanelInset
A complete example, using all the available child components, looks like:
The panel header can include both a title and an optional description. These components are arranged in a grid layout with the title and description stacked vertically on the left side and actions on the right side.
By default, the PanelHeader and PanelFooter components render without a border
to separate them from the panel's content.
A border can be enabled by setting withSectionBorders to true on the Panel:
It is also possible to control the borders individually by setting withBorder on a
PanelHeader or PanelFooter:
When using a bordered panel, a PanelSection component will automatically add additional
padding to separate the content from the borders.
By default, PanelSection components render with padding on all sides. You can disable this padding by setting withPadding={false}, which makes the section function like a PanelInset.
By default, the Panel renders with padding on all sides, and content will render accordingly. The PanelInset component can be used to stretch content to the edges of the panel, ignoring those paddings.
This can be useful in situations like rendering a full-width table, or section dividers within the Panel.
Additionally, if the PanelInset is the first or last child, the top or bottom paddings will also be ignored accordingly.
PlumaPanel extends BoxDefault:false
Whether the panel should render with borders between the Header, content and Footer.
Whether this panel renders attached to a Tabs component. This will apply a negative top margin and remove the top-left border radius, to visually connect the panel to the tabs.
PlumaPanelSection extends BoxDefault:false
Whether the section should render a border to separate it from other sections.
Default:true
Whether the section should render with padding. If false, the section will function like PanelInset with no padding. When true (default), the section includes standard panel padding.
PlumaPanelHeader extends BoxDefault:false
Whether the section should render a border to separate it from other sections.
Default:true
Whether the section should render with padding. If false, the section will function like PanelInset with no padding. When true (default), the section includes standard panel padding.
PlumaPanelTitle extends BoxThe text color. (See text color tokens)
The font family. (See font family tokens)
The font style. (See MDN font-style)
Default:2
The level of the heading (which maps to h1-h6 tags)
The text size. (See font size tokens)
A predefined typography style. (See text tokens)
PlumaPanelDescription extends BoxThe text color. (See text color tokens)
The font family. (See font family tokens)
The font style. (See MDN font-style)
The text size. (See font size tokens)
Default:md
Size variant of paragraph style
A predefined typography style. (See text tokens)
Variant of paragraph style