Sheet

@sushindustries/ui

The dialog docked to an edge, for content tall enough that centring it would mean scrolling a floating box.

4 min read
View as MarkdownEdit on GitHub

Sheet is a dialog docked to an edge instead of centred - for a list or a filter form tall enough that centring it would mean scrolling a floating box in the middle of the page. It is still fully modal: the page behind it stays unreachable until it closes.

Viewport width
Phone22remthe floor, the narrowest this promises to work at
tanstacktanstack add https://adamjurek.com/r/tanstack/sheet.jsonshadcnpnpm dlx shadcn@latest add https://adamjurek.com/r/shadcn/sheet.json

Why it is built this way

It is the same native <dialog> element and the same open, onClose and title props as a centred dialog - only the geometry differs. side writes data-side on the element, so choosing docked over centred is a prop, not a second component with its own API to learn.

Install

tanstack add https://adamjurek.com/r/tanstack/sheet.json
shell
pnpm dlx shadcn@latest add https://adamjurek.com/r/shadcn/sheet.json
shell
pnpm add @sushindustries/ui @sushindustries/atoms
shell

What you get

Version0.1.0
Categorylayout · Overlays
Filessheet.tsx
DependenciesNone
Also installsiconIconThe glyph set, generated from a Markdown table where every drawing carries its reason. One component, typed names, no icon font.@sushindustries/ui · content
Tagsmodal, drawer, no-deps

No runtime dependencies

It brings nothing with it beyond the stylesheet.

UsesIconIconThe glyph set, generated from a Markdown table where every drawing carries its reason. One component, typed names, no icon font.@sushindustries/ui · content
Mentioned inToast