Search the docs

Search Keyframery's docs

Keyframery
Components

Sheet animation

Animate the shadcn/ui Sheet: it slides in from its edge while the page steps back behind it, and everything returns when it closes. No code changes.

with <Cuts />

What it fixes

A stock sheet slides over a page that doesn't react, so the two look flat against each other. With slide-sink, the page behind scales to 0.975, dims slightly and rounds its corners while the sheet arrives. Now the sheet reads as on top. When it closes, the page comes forward again.

The part of the page that steps back is the top-level element in <body> that holds the button you pressed. A sheet opened from inside another sheet doesn't sink the page twice.

Install

npx shadcn add sheet

Choose a cut

<Cuts sheet="slide" />
<SheetContent data-cut="fade" />

Prop

Type

CutOpeningClosing
slide-sinkfrom its edge over 460 ms, and the page steps back260 ms, and the page returns
slidethe same, without the page stepping backsame
fadeopacity only, 200 ms150 ms

Questions

Can the page stay still behind the sheet?

Yes. Use <Cuts sheet="slide" />: the sheet slides in from its edge without the page stepping back.

On this page