When to use
- Tool surfaces
- Side panels
- Repeated content groups
- Focused workflow areas
Panels group related controls or content inside operational interfaces. Use them when a boundary clarifies the task, not as decoration around every section.
Start here before choosing examples or props. These notes explain where Panel helps, where another pattern is better, and what should stay true in product work.
import { Panel } from '@/components/ui/Panel';Renders a labeled section container. Compose internal layout with normal HTML inside.
Panels are functional containers. They should help users scan, compare, or complete work without turning the whole page into a stack of boxes.
Use panels to group controls that operate on the same object or view.
Use a side panel for contextual details without leaving the current workflow.
Use a panel when each group has a real boundary and a clear heading.
Use panels to contain a focused task with related fields and actions.
Use a panel for operational state that users need to scan repeatedly.
Do not wrap every page section just to make the page feel designed.
A panel should have a clear region name, a meaningful boundary, and content that belongs together. Internal structure should stay readable without nesting framed surfaces.
The component accepts every native HTMLElement attribute on top of the design system props below.
| Prop | Type | Default | Description |
|---|---|---|---|
title | ReactNode | — | Region heading rendered inside the panel. Strings get wrapped in an h3. |
titleId | string | — | Sets id on the heading and auto-wires aria-labelledby on the section element. |
titleIcon | ReactNode | — | Icon rendered before the title. Mark decorative icons with aria-hidden. |
Use a panel when the boundary helps users understand controls, content, or workflow state.
Page-level sections should usually be unframed. A panel should earn its border through function.
Use headings, spacing, dividers, or rows inside a panel before reaching for nested framed surfaces.
Nested framed surfaces create visual noise and make generated layouts harder to reason about.
What Panel does not do yet, and what consumers need to compose themselves.
Agents should use panels only when grouping improves task clarity. Generated layouts should use spacing and headings for page structure before adding framed surfaces.
import { Panel } from '@/components/ui/Panel';
<Panel title="Filters" titleId="filters-heading">
<fieldset>
<legend>Status</legend>
{/* related controls */}
</fieldset>
</Panel>Use a panel when the boundary helps people do work. Do not use a panel when the boundary only makes a page section look more finished.