Clinia UI

Sheet

A panel that slides in from an edge of the screen, for filters, details and secondary tasks.

shadcn docs →

When to use

  • Filters, details or settings next to the page, while the page stays in view.
  • A secondary task that needs more room than a Popover: edit a source's sync settings.

When not to use

  • A short task that needs full attention: use Dialog.
  • A bottom panel on a touch screen, dismissed with a swipe: use Drawer.
  • Persistent app navigation: use Sidebar.
  • Confirming a destructive action: use Alert Dialog.

Install

npx shadcn@latest add @clinia/sheet

Anatomy

Filters

Narrow the patient list.

  1. 1Paneldata-slot="sheet-content"bg-popover · border-l · shadow-xl
  2. 2Titledata-slot="sheet-title"text-base · font-medium
  3. 3Descriptiondata-slot="sheet-description"text-sm · text-muted-foreground
  4. 4Body[data-part=body]px-6
  5. 5Footerdata-slot="sheet-footer"mt-auto · main action on top
  6. 6Close buttondata-slot="sheet-close"ghost · icon-sm

Clinia rules

  • It slides in from the right by default (side). Left and right sheets take three quarters of the screen width, capped at max-w-sm from sm up.
  • The title is sentence case and names what's inside: Filter records.
  • The footer stacks its buttons at the bottom of the sheet. Put the main action on top.
  • Keep the close button (showCloseButton), unless the footer has its own way out.

Do and don't

Filters

Narrow the patient list.

Do keep filters or details beside the page, with the main action on top.

Delete this source?

Its records are removed from the workspace.

Don't confirm a destructive action in it. Use Alert Dialog.

Accessibility

Built in

  • Built on Base UI Dialog: focus moves into the sheet and stays inside, Escape closes it, and focus returns to the trigger.
  • The corner close button is labelled Close for screen readers.

Your responsibility

  • Always render a SheetTitle. Add SheetDescription when the title alone doesn't explain the panel.
  • Open it from a real button, so focus has somewhere to return.

How to test

  1. Open it with the keyboard: focus lands inside the sheet.
  2. Press Tab repeatedly: focus cycles through the sheet and never reaches the page behind.
  3. Press Escape: it closes, and focus returns to the button that opened it.
  4. With a screen reader, opening it announces a dialog and its title.

API

SheetContent

PropValuesDefaultDescription
side
toprightbottomleft
right

The edge the sheet slides in from.

showCloseButton
boolean
true

Shows the close button in the corner. Turn it off only when the footer has its own way out.

All other props come from Base UI Dialog.