Sheet

Sheets present a focused modal panel from an explicit side while leaving product workflows to the consumer.

Overview and decision boundary

Use Sheet for a focused modal panel that needs more room than a popover without becoming a product shell.

Do not use Sheet as a persistent sidebar, resizable panel, AppShell, or routing container.

Preview

import { Button, Sheet, SheetBody, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger } from '@nerio-ui/ui/client';<Sheet>  <SheetTrigger render={<Button variant="secondary">Open settings</Button>} />  <SheetContent side="right" size="md" showClose={false}>    <SheetHeader>      <SheetTitle>Workspace settings</SheetTitle>      <SheetDescription>Configure shared defaults for this workspace.</SheetDescription>    </SheetHeader>    <SheetBody>...</SheetBody>    <SheetFooter>      <SheetClose render={<Button variant="secondary">Cancel</Button>} />      <Button>Save changes</Button>    </SheetFooter>  </SheetContent></Sheet>

Installation and imports

Install the editable registry source, or use the matching package entrypoint when the product keeps Nerio as a workspace dependency.

pnpm dlx nerio add sheetimport { Button, Sheet, SheetBody, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger } from '@nerio-ui/ui/client';

Usage

import { Button, Sheet, SheetBody, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger } from '@nerio-ui/ui/client';<Sheet>  <SheetTrigger render={<Button variant="secondary">Open settings</Button>} />  <SheetContent side="right" size="md" showClose={false}>    <SheetHeader>      <SheetTitle>Workspace settings</SheetTitle>      <SheetDescription>Configure shared defaults for this workspace.</SheetDescription>    </SheetHeader>    <SheetBody>...</SheetBody>    <SheetFooter>      <SheetClose render={<Button variant="secondary">Cancel</Button>} />      <Button>Save changes</Button>    </SheetFooter>  </SheetContent></Sheet>

Variants

VariantPurpose
side: left | right | top | bottomSide: left | right | top | bottom is part of the public component contract.
size: sm | md | lgSize: sm | md | lg is part of the public component contract.

Anatomy

SlotPurpose
sheet-triggerSheet Trigger slot exposed through data-slot="sheet-trigger".
sheet-backdropSheet Backdrop slot exposed through data-slot="sheet-backdrop".
sheet-contentSheet Content slot exposed through data-slot="sheet-content".
sheet-headerSheet Header slot exposed through data-slot="sheet-header".
sheet-titleSheet Title slot exposed through data-slot="sheet-title".
sheet-descriptionSheet Description slot exposed through data-slot="sheet-description".
sheet-bodySheet Body slot exposed through data-slot="sheet-body".
sheet-footerSheet Footer slot exposed through data-slot="sheet-footer".
sheet-closeSheet Close slot exposed through data-slot="sheet-close".

States

StatePurpose
OpenFocus is contained in the modal panel and the page scroll is locked.
ClosedThe panel is removed and focus returns to its trigger.
Long contentThe body scrolls while header and footer remain available.

Motion

  • Entry and exit direction follow side and use the shared overlay timing and easing contracts.
  • Reduced motion disables both enter and exit animation without changing the final state.

Accessibility

  • Uses the Base UI Dialog primitive for modal focus management, Escape and backdrop dismissal, focus restoration, and scroll locking.
  • Provide SheetTitle or an explicit accessible name on SheetContent.
  • Includes a localized aria-label="Close sheet" secondary icon Button by default; when showClose is false, consumers must provide another clear close path.
  • SheetBody scrolls internally for long content; with viewport-fit=cover, safe-area insets protect panel padding and the default close; physical left and right sides remain explicit in RTL.
  • Supports controlled open, uncontrolled defaultOpen, onOpenChange, and forwarded refs on meaningful slots.

API

PropPurpose
SheetControlled or uncontrolled Base UI Dialog root: open, defaultOpen, and onOpenChange.
SheetContentAccepts side, size, showClose, closeLabel, className, refs, and native dialog popup props.
SheetTriggerUses Base UI render composition so consumers supply their own trigger element.
SheetHeader / SheetTitle / SheetDescriptionNamed accessible context slots.
SheetBody / SheetFooter / SheetCloseScrollable content, action, and dismissal boundaries. SheetClose is neutral in normal flow and supports Button render composition.

Implementation contract

ContractValue
Registry itemsheet installs 6 source files into the configured components directory.
Base UIdialog
Registry dependenciesbutton
Package dependencies@base-ui/react, @nerio-ui/adapters, clsx, react, tailwind-merge, tailwindcss

Styling contract

ContractValue
AuthoringComplete, statically detectable Tailwind CSS v4 recipes own component visuals.
ValuesSemantic and component --n-* variables remain the canonical customization layer.
OverridesCustomizable slots merge consumer className values with tailwindCn so conflicting utilities resolve deterministically.
Residual CSSOnly shared keyframes and scoped no-Preflight compatibility rules remain; there is no parallel visual selector layer.

Design notes

  • Use Sheet for a focused modal panel that needs more room than a popover without becoming a product shell.

Do / do not

Do

Use for a small settings surface, mobile navigation, or contextual details owned by the consumer.

Keep one clear task and give the panel a concise accessible name.

Do not

Do not use Sheet as a persistent sidebar, resizable panel, AppShell, or routing container.

Do not hide the only close path when showClose is false.

Tokens

These are the primary customization points. Override semantic or component tokens instead of changing component source.

TokenPurpose
--n-sheet-width-smPublic customization point for this component contract.
--n-sheet-width-mdPublic customization point for this component contract.
--n-sheet-width-lgPublic customization point for this component contract.
--n-sheet-height-smPublic customization point for this component contract.
--n-sheet-height-mdPublic customization point for this component contract.
--n-sheet-height-lgPublic customization point for this component contract.
--n-sheet-paddingPublic customization point for this component contract.
--n-sheet-gapPublic customization point for this component contract.
--n-sheet-radiusPublic customization point for this component contract.
--n-sheet-backdropPublic customization point for this component contract.
--n-sheet-transition-distancePublic customization point for this component contract.
--n-sheet-viewport-insetPublic customization point for this component contract.
--n-sheet-available-inlinePublic customization point for this component contract.
--n-sheet-available-blockPublic customization point for this component contract.
--n-motion-overlay-enter-durationPublic customization point for this component contract.
--n-motion-overlay-enter-easingPublic customization point for this component contract.
--n-motion-overlay-exit-durationPublic customization point for this component contract.
--n-motion-overlay-exit-easingPublic customization point for this component contract.
--n-overlay-z-indexPublic customization point for this component contract.
--n-overlay-backgroundPublic customization point for this component contract.
--n-overlay-border-widthPublic customization point for this component contract.
--n-overlay-borderPublic customization point for this component contract.
--n-overlay-backdrop-filterPublic customization point for this component contract.
--n-overlay-shadowPublic customization point for this component contract.
--n-overlay-foregroundPublic customization point for this component contract.
--n-overlay-foreground-mutedPublic customization point for this component contract.
--n-overlay-control-backgroundPublic customization point for this component contract.
--n-overlay-control-background-hoverPublic customization point for this component contract.
--n-overlay-surface-filterPublic customization point for this component contract.
--n-input-background-on-overlayPublic customization point for this component contract.
--n-input-background-on-overlay-hoverPublic customization point for this component contract.
--n-input-foreground-on-overlayPublic customization point for this component contract.
--n-input-placeholder-on-overlayPublic customization point for this component contract.
--n-focus-ringPublic customization point for this component contract.