nalarx-ui
Components

Sheet

A side panel that slides in from the right, for detail views and longer forms.

bunx shadcn@latest add @nalarx/sheet

Usage

<Sheet open={open} onOpenChange={setOpen}>
  <SheetContent>
    <SheetHeader>
      <SheetTitle>Invite member</SheetTitle>
    </SheetHeader>
    <div className="flex-1 overflow-y-auto px-5 py-4">{/* body */}</div>
    <SheetFooter>
      <SheetFooterError>{error}</SheetFooterError>
      <SheetClose render={<Button variant="ghost" />}>Cancel</SheetClose>
      <Button variant="accent" onClick={send}>Send invite</Button>
    </SheetFooter>
  </SheetContent>
</Sheet>

A plain sheet, and one whose footer shows an error. The panel opens in the docs page's own scheme.

States

  • Open: slides 40px in from the right while fading; exit reverses it and can be interrupted. No motion under reduced motion.
  • Width: full width on phones, 448px from sm up. Pass className="sm:max-w-xl" for a wider panel.
  • Error: SheetFooterError renders nothing when empty; with text it takes the free width left of the actions and is announced (role="alert").

Keyboard

Same as Dialog: focus stays inside, Escape closes and returns focus to the trigger, Tab cycles through the panel.

Props

Sheet takes Base UI Dialog.Root props; SheetContent takes Dialog.Popup props plus:

PropTypeDefault
showCloseButtonbooleantrue
closeLabelstringclose string

Replaces

Platform base/Sheet.tsx.

On this page