Skip to content
ProLifetime access for $199, paid once, every future release included
Truffle UI

Sheet

ProNew

A panel that slides in from any edge with a fixed header and footer. The bottom sheet follows the finger and closes on a drag or a flick.

Installation

pnpm dlx shadcn@latest add @viewport/sheet

First time? Add the @viewport registry to components.json. Setup takes one minute.

Usage

The code behind the preview above comes with Truffle Pro.

Props

PropTypeDefault
title*string

The heading of the panel. It also names the dialog for screen readers.

—
descriptionstring—
sidekeyof typeof sides

The edge the panel slides in from. `bottom` can be dragged down by its handle to close.

"right"
footerReact.ReactNode

Actions pinned to the bottom of the panel, outside the scrolling area.

—

Accessibility

  • Built on Radix Dialog: focus trap, focus restore, Escape to close.
  • The title names the dialog; the description is wired when present.
  • Dragging is an addition: the close button and Escape always work.
  • Appears without sliding under reduced motion.
  • Respects the safe-area inset on phones.