Sheet
React SDK guidance for Sheet.
Exact exports, props, slots, hooks, and runtime behavior belong to SDK package reference. Examples are guidance unless explicitly marked copy-paste-safe.
Review component intent and composition guidance before wiring this component into an app. Then use the live playground to confirm the rendered behavior.
Playground
- Import path:
@enadhq/enad-react-sdk/client/ui-resolver. - Live playground: /components/base-ui/sheet.
When to use it
Use Sheet when the page needs a panel that slides in from an edge without fully replacing the current view. It is the natural choice for cart drawers, mobile navigation menus, filter sidebars, and settings panels where visitors should still feel connected to the page behind the overlay.
If the content needs to fully interrupt the flow (confirmation, edit form, critical decision), use Dialog instead. Sheet is for persistent, browsable side-content.
Slot strategy
Sheet builds on the Dialog primitive with a side-aware layout:
Sheetis the root. It manages open/close state and acceptsopenandonOpenChangefor controlled usage.SheetTriggeris the element that opens the panel. UseasChildto render your own button.SheetContentis the sliding panel. It wraps itself with a portal and overlay automatically. Thesideprop controls which edge it slides from:right(default),left,top, orbottom.SheetHeadersits at the top with a bottom border and holds the title and description.SheetFootersticks to the bottom usingmt-auto, which makes it stay anchored regardless of body content length.SheetTitlerenders the heading and includes an optional close button (controlled byshowClose, defaults totrue).SheetDescriptionprovides supporting context below the title.SheetCloseis available for additional close affordances inside the body.
Side and width
Left and right sheets default to
w-3/4on mobile andsm:max-w-smon larger screens. Override the width with aclassNameonSheetContentwhen the panel needs more room, like a filter sidebar atw-[400px].
Behavior and theming guidance
The panel slides in with a directional animation that matches the side prop. Opening uses a slower 500ms ease-in-out, and closing uses a faster 300ms transition, which makes the dismiss feel snappier than the reveal.
The overlay dims the background the same way Dialog does. Clicking the overlay or pressing Escape closes the sheet.
For cart drawers and similar persistent panels, use controlled state with open and onOpenChange so you can update the sheet content in response to cart mutations and close it programmatically after checkout navigation.
Contract scope
- Use SDK package reference for exact props, exports, slots, hooks, and runtime behavior.
- Public import:
@enadhq/enad-react-sdk/client/ui-resolver. - Playground route: /sandbox?component=Sheet.
- Copy/paste scope: guidance-only. Treat examples as guidance until checked against SDK package reference.