Sheet

Slides in from the bottom or right on a spring. Drag it away to dismiss; a flick is enough. Overlays.

Open playground

About

Sheet is a React component in the Overlays category of smoui. It is typed, ships no stylesheet, follows your theme through CSS variables, and honors prefers-reduced-motion. Import it with import { Sheet } from "@ashutoshswamy/smoui" and set side, trigger, open.

Install

Terminal
npm i @ashutoshswamy/smoui

Usage

TSX
import { Sheet } from "@ashutoshswamy/smoui";

<Sheet trigger="Open" title="Share project" side="bottom">Content</Sheet>

Props 3

side

Edge it slides from.

"bottom""right"default "bottom"
trigger / title / children

Opening button and content. data-close elements close it.

ReactNode
open / onOpenChange

Controlled state.

boolean / (open: boolean) => void