structyl

Sheet

stable

A panel that slides in from any edge of the screen.

Basic usage

Examples

Edit profile

A right-side sheet with a form for updating user details.

Side panel variants

Sheet supports every side and keeps dialog behavior for focus and dismissal.

Features

  • Four sides.
  • Built on Dialog — focus trap + scroll lock.

Installation

bash
pnpm dlx structyl add sheet

API Reference

Sheet.Root

Contains all sheet parts (built on Dialog).

PropTypeDefault
openboolean

Controlled open state.

onOpenChange(open: boolean) => void

Called when open state changes.

Sheet.Trigger

Opens the sheet.

PropTypeDefault
asChildboolean

Merge props onto the immediate child instead of rendering a default element.

false

Sheet.Content

The sliding panel.

PropTypeDefault
side'top' | 'right' | 'bottom' | 'left'

Edge the sheet slides from.

'right'
classNamestring

Additional Tailwind classes, merged with the component defaults.

Sheet | structyl