Install
Install
Section titled “Install”bun add scrollsheetnpm i scrollsheetpnpm add scrollsheetyarn add scrollsheetImport
Section titled “Import”Then import the component and the stylesheet, once per app:
import { Sheet } from 'scrollsheet';import 'scrollsheet/styles.css';To embed the stylesheet without a CSS import, use import { Sheet } from 'scrollsheet/auto'.
Sheet.* is client-only: in Next.js App Router, add "use client" to the file that renders it.
A confirmation sheet with a title, body, and two buttons. Dragging does not dismiss it.
No peer dependencies beyond React and React DOM, 18 or newer.
shadcn/ui
Section titled “shadcn/ui”Every primitive and pattern also ships as a registry item, installable with the shadcn CLI:
bunx shadcn@latest add https://scrollsheet.dev/r/drawer.jsonbunx shadcn@latest add https://scrollsheet.dev/r/sheet.jsonbunx shadcn@latest add https://scrollsheet.dev/r/dialog.jsonbunx shadcn@latest add https://scrollsheet.dev/r/confirm.jsonbunx shadcn@latest add https://scrollsheet.dev/r/share-sheet.jsonbunx shadcn@latest add https://scrollsheet.dev/r/sidebar.jsonbunx shadcn@latest add https://scrollsheet.dev/r/toast.jsonLoad scrollsheet/styles.css once in your app for the sheet, drawer, dialog, and components built on them.
Load scrollsheet/toast.css if you install the toast wrapper.
The registry index lists every item. For install commands and demos, see Mobile select, Command palette, Picker wheel, and Action sheet.
Or fetch the same files from GitHub: replace https://scrollsheet.dev/r/ with
https://raw.githubusercontent.com/ansumanshah/scrollsheet/main/registry/.
Each writes one file into components/ui/: drawer.tsx, sheet.tsx, dialog.tsx,
confirm.tsx, share-sheet.tsx, sidebar.tsx, toast.tsx. confirm and share-sheet
build on drawer; sidebar builds on sheet; the CLI pulls those in automatically.
See Recipes for each pattern.
Directorycomponents/
Directoryui/
- drawer.tsx
- sheet.tsx
- dialog.tsx
- confirm.tsx
- share-sheet.tsx
- sidebar.tsx
- toast.tsx
Already on vaul or Sonner?