Skip to content

Early previewhamur is not on npm yet. The components are being built in the open, follow along on GitHub.

UIComponentsReact

Sheet

A dialog that slides in from an edge of the screen, for content beside the page.

Built on the headless Dialog.See its API in Docs

Rendered by React 19.3.1

sheet.tsx

Installation

npx shadcn@4.23.0 add https://hamur.dev/r/react/sheet.json

It also adds utils, button. The app needs its setup first: Installation.

Usage

Sheet holds SheetTrigger and SheetContent; put SheetHeader (with SheetTitle and SheetDescription), the body and SheetFooter inside the content, and SheetClose where a button should close it. side (top, right, bottom, left; right by default) picks the edge, and the close button in the corner stays unless showCloseButton is false. In Angular the template writes baseDialogPortal itself. A Sheet is the headless Dialog, so its open state, focus and Escape are the Dialog's.

import {
  Sheet,
  SheetClose,
  SheetContent,
  SheetDescription,
  SheetFooter,
  SheetHeader,
  SheetTitle,
  SheetTrigger,
} from '@/components/ui/sheet'

Examples

Default

A profile form in a sheet from the right.

Its preview and code are at the top of the page.

Side

One trigger for each of the four sides.

Rendered by React 19.3.1

sheet-side.tsx

API reference

The styled parts pass every prop to the headless part they wrap and add classes. The props, data attributes and keyboard are on Dialog's API reference.