Sheetshadcn
A panel that slides in from an edge.
Overlays- Install
- npx shadcn add sheet
- Import from
- @/components/ui/sheet
- Guidance
- draft · v0.1.0
Examples
As installed from shadcn – rendering in jsp-ds tokens through the bridge.
Guidance
When to use
- Secondary work beside the page that people dip into and out of: filters, details of a row, a mobile nav.
When not to use
- For a focused task with a result – use a Dialog.
Rules
- A
SheetTitlesays what it is; actions go inSheetFooter. - Right side for details and filters; left for navigation.
- Like a dialog, it traps focus, closes on Esc and returns focus to the trigger.
Spec
The variables this component reads, and the jsp-ds token behind each, resolved live. Switch mode to see them change.
| Token | CSS variable | Value now |
|---|---|---|
| color.surface.defaultT-3: surface.overlay to come | --popover | … |
| color.text.default | --popover-foreground | … |
| color.border.subtle | --border | … |
| shadow.lg | --shadow-lg | … |
Install
Terminal
npx shadcn add sheetImport
import { Sheet } from "@/components/ui/sheet"From shadcn’s own registry. Don’t edit the installed file – jsp-ds styles it through the bridge, and fixes go in styles/overrides.css with an issue.