Skip to content
HomeCobalt

Sheet

A panel that slides in from the edge of the screen.

Examples

Filters for a reading list, chosen in the sheet and applied from its footer.

No filters on.

Editor beside the pageAn editor that leaves the page undimmed from 640px up, so the name it changes stays in view.

Credit funds watchlist

Variants

Reading list, 12 items

LeftA list that belongs to the start of the page, such as the lists a page can switch to.
BottomA bottom sheet on a phone, for a picker or a share that is as tall as its content. From 640px up it is a 448px panel centred 10px above the bottom edge, the width of a side sheet, so its field and its button never stretch across the window. A task that belongs beside the page at that width is right.
TopA notice that must be read before going on, as tall as its content: full width on a phone, a 448px panel centred under the top edge from 640px up.

Usage

Use it when

  • The task is a list, a set of filters, a long form or an editor that would scroll inside a dialog.
  • The task belongs beside the page, so you want to see what it changes while you work.
  • A picker needs to become a bottom sheet on a phone.

Use something else when

  • The task is a form that fits in 288px. Use Dialog instead.
  • The question is yes or no. Use AlertDialog instead.
  • The content is a list of actions on one thing. Use DropdownMenu instead.
  • The content is the page's own navigation. Use Nav instead.

Rules

General

Content

Avoid

Limits

Install

npx shadcn@latest add https://kaanarici.com/r/cobalt/sheet.json
import { Sheet, SheetTrigger, SheetContent, SheetHeader, SheetBody, SheetFooter, SheetTitle, SheetDescription, SheetClose } from "@/components/cobalt/ui/sheet"