Skip to main content

Panel

The look of the app shell's side panel as a part of its own, with a header row, a scroll body, and a pinned footer. It has no open state and no placement: set its height, and the body takes what the header and the footer leave.

Desktop viewport
Tablet viewport
Mobile viewport

When to use

  • Show a titled surface beside other content, with a header row, a body that scrolls on its own, and an optional bar pinned to the bottom, such as an assistant beside the page.
  • Use AppLayout.SidePanel when the panel opens and closes beside the page card of an app shell. It renders Panel inside and adds the open state, the placement, and the spacing around it.
  • Use Card when the content sits in the page flow and does not scroll on its own.
  • Use Sheet when the panel is a modal overlay with a backdrop.

Header on its own

Panel.Header also stands alone as the header row of a full page, such as a chat page, so the page and a panel share one header. It sits on the same band as AppLayout.Header.

Desktop viewport
Tablet viewport
Mobile viewport

Composition

Panel.Root
├── Panel.Header
├── Panel.Body
└── Panel.Footer

Polymorphism

Every part accepts asChild:

  • Panel.Root: a <div> when the panel is not a landmark, such as inside another <aside>. AppLayout.SidePanel does this, because its own <aside> is the landmark. A <section> named by its heading makes the panel a region landmark in place of complementary, as in this example.
  • Panel.Header: a <header> when the row introduces the panel.
  • Panel.Body: an <ol> when the body is one list.
  • Panel.Footer: a <form> when the bar is a composer.
Desktop viewport
Tablet viewport
Mobile viewport

API Reference

Panel.Root

The card surface: a column with the card background, a muted hairline border, rounded corners, and a small shadow. Renders an <aside>, so name it with aria-label. It is relative, and it shrinks as a flex item instead of growing to its content.

All props from aside, plus:

PropTypeDefaultDescription
asChild?booleanfalseCompose the panel's styling onto the child element.
Data AttributeValueDescription
data-slot"panel"The root element.

Panel.Header

The toolbar row at the top of the panel, on the same band as AppLayout.Header. Render it as the first child of Panel.Root.

All props from div, plus:

PropTypeDefaultDescription
asChild?booleanfalseCompose the header's styling onto the child element.
CSS VariableDefaultDescription
--sidebar-header-height4.5remRead, not owned: Sidebar.Header owns this token. In an AppLayout shell with a sidebar header, the row derives its height from it.
--app-layout-card-gutter0.5remRead, not owned: AppLayout.Content owns this token. The derived height subtracts twice its value.
Data AttributeValueDescription
data-slot"panel-header"The header row.

Panel.Body

The scroll region, and the only part of the panel that scrolls. Render it after Panel.Header.

All props from div, plus:

PropTypeDefaultDescription
asChild?booleanfalseCompose the body's styling onto the child element.
Data AttributeValueDescription
data-slot"panel-body"The scroll region.

Panel.Footer

The bar pinned to the bottom of the panel, outside the scroll region. Render it after Panel.Body. Optional.

All props from div, plus:

PropTypeDefaultDescription
asChild?booleanfalseCompose the footer's styling onto the child element.
Data AttributeValueDescription
data-slot"panel-footer"The pinned bar.