Skip to Content
glob.ui home
Components

Sheet

A panel that slides in from an edge. It is a Dialog: same focus handling, Escape, backdrop and scroll lock.

Client componentUses state or handlers, so it starts with "use client".
import { Sheet, SheetTrigger, SheetContent, SheetHeader, SheetTitle, SheetDescription, SheetFooter, SheetClose } from "@glob-ui/sheet"

Preview

Settings

Changes apply to your account.

Examples

Sides

side is right (default), left, top or bottom. Top and bottom are full width.

right sheet

It slides in from the right.

left sheet

It slides in from the left.

top sheet

It slides in from the top.

bottom sheet

It slides in from the bottom.

Sizes

size is sm, md (default) or lg for left and right. It does not apply to top and bottom.

Size sm

The width follows the size prop (left and right sheets).

Size md

The width follows the size prop (left and right sheets).

Size lg

The width follows the size prop (left and right sheets).

API

Props are generated from the TypeScript types in the package source.

Sheet

Prop

Type

SheetTrigger

Prop

Type

SheetContent

Prop

Type

SheetClose

Prop

Type

Accessibility

Key or actionBehaviour
Enter, Space on the triggerOpens the sheet. Focus moves inside.
Tab, Shift+TabCycle inside the sheet. The page behind is inert.
EscapeCloses the sheet and returns focus to the trigger.
Backdrop clickCloses the sheet.

ARIA. The sheet is a modal dialog named by SheetTitle and described by SheetDescription. Always include a title. Build your own modal on the same behaviour with DialogContentBase from @glob-ui/dialog.

On this page