You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Slide-out panel that enters from a screen edge (bottom, right, left, top). Common patterns:
Mobile navigation — slide from left/bottom
Detail panels — slide from right to show item details without leaving context
Filters — slide from right/bottom with filter controls
Action sheets — slide from bottom on mobile (iOS-style)
other internal library has both Sheet and Drawer as separate components, but they are functionally similar — both are edge-anchored overlay panels with different default behaviors.
other internal library API shape
Sheet: full-height side panel, typically from right
Drawer: typically from bottom, often with drag-to-dismiss
Both support: side (left/right/top/bottom), isOpen/onOpenChange, overlay backdrop
Approach considerations
Variant of XDSDialog — XDSDialog already handles overlay + focus trap. A variant="sheet" or placement="right" prop could make it slide from edges. Keeps the component count low.
Standalone XDSSheet — Separate component with edge-specific animations and sizing. Allows different dismiss behaviors (swipe to dismiss for bottom sheets).
Single component with side prop — XDSSheet with side="right|left|top|bottom" covering both sheet and drawer patterns. Bottom variant gets swipe-to-dismiss.
Key behaviors
Edge-anchored (not centered like Dialog)
Slide-in/out animation from the specified edge
Backdrop overlay with click-to-dismiss
Focus trap while open
Optional swipe/drag to dismiss (especially bottom sheet)
Responsive: may switch from side to bottom on mobile
Context
Part of the other internal library → XDS OSS migration effort. 318 combined usages across Sheet and Drawer in other internal library. Mobile-first apps particularly depend on this pattern.
Standalone XDSSheet component that composes XDSDialog internally.
Sheet has fundamentally different animation (slide vs scale), positioning (edge-anchored vs centered), and sizing (full-height/width vs constrained)
Single XDSSheet component covers both "sheet" and "drawer" patterns — side prop handles all four edges
Named XDSSheet not XDSDrawer — matches dominant other internal library usage (299 vs 19), aligns with Apple/Google/shadcn naming
API
import{XDSSheet}from'@xds/core/Sheet';// Detail panel (most common — right side)<XDSSheetisOpen={isOpen}onOpenChange={setIsOpen}><XDSLayoutheader={<XDSDialogHeadertitle="Details"onOpenChange={setIsOpen}/>}content={<XDSLayoutContent>Content here</XDSLayoutContent>}/></XDSSheet>// Left navigation<XDSSheetisOpen={isOpen}onOpenChange={setIsOpen}side="left"size="sm"><nav>...</nav></XDSSheet>// Bottom action sheet<XDSSheetisOpen={isOpen}onOpenChange={setIsOpen}side="bottom"height="auto"><XDSLayoutheader={<XDSDialogHeadertitle="Share"onOpenChange={setIsOpen}/>}content={<XDSLayoutContent>Actions</XDSLayoutContent>}/></XDSSheet>
Props
Prop
Type
Default
Description
isOpen
boolean
(required)
Whether the sheet is open
onOpenChange
(isOpen: boolean) => unknown
(required)
Visibility change callback
side
'left' | 'right' | 'top' | 'bottom'
'right'
Edge the sheet slides from
size
'sm' | 'md' | 'lg'
'md'
Preset size (width for sides, height for top/bottom)
width
number | string
—
Custom width (overrides size for left/right)
height
number | string
—
Custom height (overrides size for top/bottom, 'auto' for content-fit)
purpose
'info' | 'form' | 'required'
'info'
Dismissal behavior (inherited from Dialog)
children
ReactNode
(required)
Sheet content
Size Presets
Size
Left/Right Width
Top/Bottom Height
sm
320px
25vh
md
400px
40vh
lg
560px
60vh
Left/right sheets are always full viewport height. Top/bottom are always full viewport width.
Key Decisions
Single component, four directions. No separate Sheet + Drawer. The side prop covers all edges. Bottom sheet = side="bottom". Matches 299:19 usage ratio.
Slide animation, not scale. Each side has its own translateX/Y animation. Left slides from left, right from right, etc. Uses transitionVars['--transition-normal'].
No swipe-to-dismiss (v1). Touch gesture handling, snap points, and physics animation are complex. Not required for initial migration. Future: isSwipeDismissible?: boolean without breaking changes.
purpose prop inherited from Dialog. Same three values (info, form, required) control dismissal identically. Consistent mental model.
Edge-specific border radius. Sheet sits flush against viewport edge with radius only on the interior corners.
height: 'auto' for content-driven bottom sheets. Bottom action sheets commonly size to content. maxHeight: 90vh prevents overflow.
No non-modal variant. Persistent side panels are handled by SideNav. Sheet is always a modal overlay.
External Research Summary
System
Name
Sides
Sizes
Swipe
shadcn
Sheet (Dialog) + Drawer (Vaul)
4 sides
Consumer variants
Drawer only
Ant Design
Drawer
4 sides
'default' | 'large' + custom
No
MUI
Drawer
4 anchors
Consumer
No
Chakra
Drawer
4 placements
xs-full presets
No
Exports
XDSSheet (component)
XDSSheetProps, XDSSheetSide, XDSSheetSize (types)
No overlap with existing Dialog exports. Clean addition.
Composition Examples
// Filter panel with form protection<XDSSheetisOpen={isOpen}onOpenChange={setIsOpen}purpose="form"size="sm"><XDSLayoutheader={<XDSDialogHeadertitle="Filters"onOpenChange={setIsOpen}/>}content={<XDSLayoutContent><XDSFormLayout><XDSSelectorlabel="Status"options={statusOptions}/></XDSFormLayout></XDSLayoutContent>}footer={<XDSLayoutFooterhasDivider><XDSButtonvariant="secondary"label="Reset"onClick={handleReset}/><XDSButtonvariant="primary"label="Apply"onClick={handleApply}/></XDSLayoutFooter>}/></XDSSheet>// Large content panel<XDSSheetisOpen={isOpen}onOpenChange={setIsOpen}size="lg"><XDSLayoutheader={<XDSDialogHeadertitle="Preview"onOpenChange={setIsOpen}/>}content={<XDSLayoutContent><pre>{content}</pre></XDSLayoutContent>}/></XDSSheet>
Thanks for filing this and for the detailed component sketch in the thread—it shaped what was built. The pattern now ships as BottomSheet for the bottom edge (#4468, #4519) and Drawer for start/end edges, with both included in the current overlay-dismissal family. The earlier Sheet attempt #3695 closed unmerged; the remaining naming and integration questions are active in #3675 with #5550. Closing this issue as superseded by that canonical thread; a top-anchored panel remains the one case to raise there.
Activity
cixzhang commentedon Mar 12, 2026
📋 Protocol Required
This component must go through the full specification and build protocols before implementation:
No code without an approved spec. No PR without a self-review.
cixzhang commentedon Mar 14, 2026
📋 Component Spec: XDSSheet
Architecture Decision
Standalone
XDSSheetcomponent that composesXDSDialoginternally.XDSSheetcomponent covers both "sheet" and "drawer" patterns —sideprop handles all four edgesXDSSheetnotXDSDrawer— matches dominant other internal library usage (299 vs 19), aligns with Apple/Google/shadcn namingAPI
Props
isOpenbooleanonOpenChange(isOpen: boolean) => unknownside'left' | 'right' | 'top' | 'bottom''right'size'sm' | 'md' | 'lg''md'widthnumber | stringsizefor left/right)heightnumber | stringsizefor top/bottom,'auto'for content-fit)purpose'info' | 'form' | 'required''info'childrenReactNodeSize Presets
smmdlgLeft/right sheets are always full viewport height. Top/bottom are always full viewport width.
Key Decisions
Single component, four directions. No separate Sheet + Drawer. The
sideprop covers all edges. Bottom sheet =side="bottom". Matches 299:19 usage ratio.Slide animation, not scale. Each side has its own translateX/Y animation. Left slides from left, right from right, etc. Uses
transitionVars['--transition-normal'].No swipe-to-dismiss (v1). Touch gesture handling, snap points, and physics animation are complex. Not required for initial migration. Future:
isSwipeDismissible?: booleanwithout breaking changes.purposeprop inherited from Dialog. Same three values (info,form,required) control dismissal identically. Consistent mental model.Edge-specific border radius. Sheet sits flush against viewport edge with radius only on the interior corners.
height: 'auto'for content-driven bottom sheets. Bottom action sheets commonly size to content.maxHeight: 90vhprevents overflow.No non-modal variant. Persistent side panels are handled by SideNav. Sheet is always a modal overlay.
External Research Summary
'default' | 'large'+ customExports
XDSSheet(component)XDSSheetProps,XDSSheetSide,XDSSheetSize(types)No overlap with existing Dialog exports. Clean addition.
Composition Examples
feat(lab): add BottomSheet — snap points, swipe-to-dismiss, grab handle
cixzhang commentedon Sep 2, 2026
Thanks for filing this and for the detailed component sketch in the thread—it shaped what was built. The pattern now ships as BottomSheet for the bottom edge (#4468, #4519) and Drawer for start/end edges, with both included in the current overlay-dismissal family. The earlier Sheet attempt #3695 closed unmerged; the remaining naming and integration questions are active in #3675 with #5550. Closing this issue as superseded by that canonical thread; a top-anchored panel remains the one case to raise there.