Skip to main content

Starwind UI v3.0 is now available! Migration guide

Edit Profile

Make changes to your profile here. Click save when you’re done.

Installation

Usage

General Notes

Sheets are slide-out panels that can extend from any edge of the screen. They’re built on top of the Dialog component and are great for forms and mobile navigation menus.

The essential components are Sheet, SheetTrigger, and SheetContent. The SheetHeader, SheetFooter, SheetTitle, and SheetDescription components provide additional structure.

side

Sheets can slide out from any side of the screen using the side prop.

Top Sheet

This sheet opens from the top of the screen.

Right Sheet

This sheet opens from the right side of the screen.

Bottom Sheet

This sheet opens from the bottom of the screen.

Left Sheet

This sheet opens from the left side of the screen.

API Reference

Styled Component API

These props are added or materially changed by the installed styled component. Standard HTML attributes remain available through the inherited interfaces noted below. Expand a prop to see named type definitions and framework-specific imports. Follow the Primitive and Runtime links for lower-level behavior props.

Sheet Trigger

Inherits button attributes.

Contains the following additional props:

Prop Type Default Toggle details
asChild boolean false
Description
Merges the component behavior and props into its child element.
Classification
Wrapper prop

Sheet Close

Inherits button attributes.

Contains the following additional props:

Prop Type Default Toggle details
asChild boolean false
Description
Merges the component behavior and props into its child element.
Classification
Wrapper prop

Primitive And Runtime API

Use these references when you need the lower-level behavior APIs behind Sheet.

Primitive API

Runtime API

Drawer primitive
createDrawer from @starwind-ui/runtime/drawer

Changelog

v2.0.2

  • Named the generated aggregate default export so React and Astro tooling can identify the installed component cleanly.

v2.0.0

  • Rebuilt Sheet on Starwind Runtime while preserving its styled API over the shared Drawer behavior.
  • See the Drawer Primitive for the underlying unstyled anatomy and behavior API.