Interactive

Swipe Stack

A pile of cards you flick through: drag the top one away, or click it, and it tucks under the pile.
import { SwipeStack } from "pleate/effects/swipe-stack";

Photos

Travel photo 1

Props

cards

Card faces.

ReactNode[]

threshold

Drag distance to send back (px).

numberdefault 110

spread

Turn of lower cards (deg).

numberdefault 4

sendOnClick

Click sends the top card back.

booleandefault true

Accessibility

  • The top card is a focusable button: Enter, Space or the arrows send it back and focus moves to the new top card.
  • Lower cards are aria-hidden.