Skip to content
satin

Sheet

A panel that slides in from the edge for a task that needs more room than a dialog.

Installation

Terminal
npm i @uisatin/ui
Import
import { Sheet } from '@uisatin/ui/sheet'

About 28.4 kB of JavaScript, minified and gzipped, with what it imports (React aside). The stylesheet is one file for every component.

First time with Satin? Set it up once, styles and fonts included, with the installation guide.

API Reference

The Sheet component wraps the Radix dialog in a div with role="dialog" that slides in from the right, the left or the bottom. Wrap footer buttons in SheetClose to close it.

PropTypeDefault
side
"right""left""bottom"
"right"
trigger
ReactNode
—
title
ReactNode
—
description
ReactNode
—
children
ReactNode
—
footer
ReactNode
—
open
boolean
—
defaultOpen
boolean
false
onOpenChange
(open: boolean) => void
—
modal
boolean
true
className
string
—
ref
Ref<HTMLElement>
—
...props
ComponentProps<typeof Dialog.Content>

Other attributes go to the Radix Dialog.Content part

—

Accessibility

A Radix dialog that slides in from an edge: role="dialog" labelled by title and described by description. The title is required. Opening it moves focus in; while modal (the default) the rest of the page is hidden from screen readers and can’t be reached; closing returns focus to the trigger. The close button and the bottom sheet’s handle are both buttons named "Close".

KeyAction
TaborShift+TabMoves focus through the sheet, staying inside it while it is modal.
EscCloses the sheet and returns focus to the trigger.