Components
- Accordion
- Alert
- Alert Dialog
- Aspect Ratio
- Avatar
- Badge
- Breadcrumb
- Button
- Button Group
- Calendar
- Card
- Carousel
- Chart
- Checkbox
- Code Block
- Collapsible
- Combobox
- Command
- Context Menu
- Copy Button
- Data Table
- Date Picker
- Dialog
- Drawer
- Dropdown Menu
- Empty
- Field
- Form
- Hover Card
- Input
- Input Group
- Input OTP
- Item
- Kbd
- Label
- Menubar
- Native Select
- Navigation Menu
- Page Header
- Pagination
- Panel
- Popover
- Progress
- Radio Group
- Resizable
- Scroll Area
- Section Header
- Select
- Separator
- Sheet
- Sidebar
- Skeleton
- Slider
- Sonner
- Spinner
- Stat
- Stat Card
- Switch
- Table
- Tabs
- Textarea
- Theme Toggle
- Toggle
- Toggle Group
- Tooltip
- Typography
Panel
A bordered surface container with an optional header row.
OverviewLive
Frame content with a hairline border and an optional header row.
01
Installation
Add the panel component with the shadcn CLI.
bash
npx shadcn@latest add https://swiss.ui.unsanity.ai/r/panel.json02
Usage
tsx
import { Panel } from "@/components/ui/panel"03
Examples
With actions
PanelHeader holds a title and controlsSettings
Panel body.
import { Button } from "@/components/ui/button"
import { Panel, PanelHeader } from "@/components/ui/panel"
<Panel className="w-80">
<PanelHeader>
<span className="label">Settings</span>
<Button size="sm" variant="outline">Edit</Button>
</PanelHeader>
<div className="p-4 text-sm text-muted-foreground sm:p-6">Panel body.</div>
</Panel>Content only
No headerA panel can be a plain bordered surface.
import { Panel } from "@/components/ui/panel"
<Panel className="w-80 p-4 text-sm text-muted-foreground sm:p-6">
A panel can be a plain bordered surface.
</Panel>