Sheet

A modal workspace attached to a viewport edge, with persistent task actions.

Interactive preview

Live specimenTry the component
Orbit workspacePrivate

Workspace settings

Update this sample workspace without leaving the page.

Use a name your team will recognize.
This changes the sample label only.

Private workspaces are visible to invited members. Team workspaces are visible to everyone in the sample team.

Changes stay in this local demonstration.

Installation

Add editable source to an initialized React project. Set up antiflex/ui first if you are new here.

Terminal
npx antiflex-ui@0.1.0-alpha.2 add sheet

This site previews the latest workspace styles and motion. The published alpha keeps its released styles until the next npm release.

Usage

React
<Sheet>
  <SheetTrigger>Edit settings</SheetTrigger>
  <SheetContent side="right" size="md">
    <SheetHeader>
      <SheetTitle>Workspace settings</SheetTitle>
      <SheetDescription>Update your workspace.</SheetDescription>
    </SheetHeader>
    <SheetBody>Settings form or review content</SheetBody>
    <SheetFooter><SheetClose>Done</SheetClose></SheetFooter>
  </SheetContent>
</Sheet>

API reference

All components forward native attributes, className, and refs to their underlying elements.

PropTypeDefault
Root: open / defaultOpen / onOpenChangeboolean / boolean / (open: boolean) => voiduncontrolled, closed
Content: sizesm | md | lgmd
Content: initialFocusRef / returnFocusRefRefObject<HTMLElement | null>first focusable / invoker
Content: dismissOnOutsidebooleantrue
Trigger / CloseButtonProps, native button refprimary / secondary
Content: sidetop | right | bottom | left (physical edges)right

Accessibility

Uses native modal HTML dialog with inert background, nested scroll locks, Tab/Shift+Tab loop, Escape dismissal, and focus restored to the invoker or returnFocusRef. Provide one Title or explicit aria-label/aria-labelledby, one optional short Description, and a visible Close action. initialFocusRef must point to a visible descendant; focus Title and set aria-describedby="" for long structured reading. Controlled consumers must honor onOpenChange to dismiss. Outside dismissal requires both press and release on the backdrop; set dismissOnOutside=false to disable it. Native onCancel can prevent Escape. Content stays mounted while closed, so reset drafts on opening if needed. Root has no DOM/ref. Content forwards native dialog attributes/events and its HTMLDialogElement ref; Header/Body/Footer div, Title h2, Description p, Trigger/Close button. Keep Header, Body, Footer as direct children of Content or of one direct form; Body scrolls while header and footer remain visible. Keep headings/descriptions concise on short viewports. No portal, legacy dialog polyfill, swipe, drag, or snap points are included. Side sheets fill the viewport height. Horizontal sheets fill its width. Size selects 360/448/640px width or 320/480/640px height, capped to the viewport. Left and right are physical and do not swap in RTL; text, controls, and logical spacing inherit direction.