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.
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.SidePanelwhen the panel opens and closes beside the page card of an app shell. It rendersPanelinside and adds the open state, the placement, and the spacing around it. - Use
Cardwhen the content sits in the page flow and does not scroll on its own. - Use
Sheetwhen 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.
Composition
Polymorphism
Every part accepts asChild:
Panel.Root: a<div>when the panel is not a landmark, such as inside another<aside>.AppLayout.SidePaneldoes this, because its own<aside>is the landmark. A<section>named by its heading makes the panel aregionlandmark in place ofcomplementary, 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.
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:
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:
Panel.Body
The scroll region, and the only part of the panel that scrolls. Render it after Panel.Header.
All props from div, plus:
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: