The Sheet component is a sliding panel that appears from the edges of the screen. Built on Radix UI, it provides smooth animations, accessibility features, and flexible positioning. Perfect for navigation menus, forms, settings panels, and any content that needs additional space without leaving the current page.
Basic Usage
Different Sides
From Right From Left From Top From Bottom
Settings Panel
Controlled Sheet
Open Sheet Close Sheet
Sheet is currently: Closed
Properties
Sheet
Property Type Default Description defaultOpenbooleanfalseThe default open state for uncontrolled usage. openboolean- The controlled open state of the sheet. onOpenChange(open: boolean) => void- Callback when the open state changes.
SheetTrigger
Property Type Default Description asChildbooleanfalseRender as child element instead of button. childrenReactNode- Trigger element content.
SheetContent
Property Type Default Description side"top" | "right" | "bottom" | "left""right"Side of the screen where the sheet appears. classNamestring- Additional CSS classes. childrenReactNode- Sheet content.
Property Type Description classNamestringAdditional CSS classes for the header. childrenReactNodeHeader content (title, description).
SheetTitle
Property Type Description classNamestringAdditional CSS classes for the title. childrenReactNodeTitle text.
SheetDescription
Property Type Description classNamestringAdditional CSS classes for the description. childrenReactNodeDescription text.
Property Type Description classNamestringAdditional CSS classes for the footer. childrenReactNodeFooter content (buttons, actions).
Accessibility
The Sheet component includes comprehensive accessibility features:
Keyboard Navigation - Escape key to close, Tab navigation within sheet
Focus Management - Automatic focus trapping and restoration
Screen Reader Support - Proper ARIA attributes and announcements
Portal Rendering - Renders in document body to avoid z-index issues
Overlay Interaction - Click outside to close (can be disabled)
Common Use Cases
The Sheet component is perfect for:
Navigation Menus - Mobile-friendly navigation and menu systems
Forms & Wizards - Multi-step forms and data entry workflows
Settings Panels - Application preferences and configuration
Content Details - Additional information without page navigation
Shopping Carts - E-commerce cart and checkout flows
User Profiles - Profile editing and account management
Filters & Search - Advanced filtering and search interfaces
Best Practices
Appropriate Side - Choose the side that makes sense for your layout and content
Clear Purpose - Use descriptive titles and descriptions
Proper Width - Set appropriate width for content, especially on larger screens
Mobile First - Design sheets with mobile experience in mind
Focus Management - Ensure proper focus handling for accessibility
Content Organization - Use headers and footers to organize content clearly
Performance - Avoid heavy content that might cause layout shifts
Consistent Behavior - Maintain consistent sheet behavior across your application