Toggle Sidebar B
AppearanceLight & dark mode D

Stack (FX)

Layered stack with swipe animations, autoplay and smooth transitions.

Default

Drag the top card away to send it to the back. Every prop is wired to the controls underneath.

Dark previewReplay previewOpen in new tab
card-1
card-2
card-3
card-4

Customize

Sensitivity200
Autoplay Delay3000ms

API Reference

FxStack

PropTypeDefaultDescription
randomRotationbooleanfalseApplies a random rotation to each card for a 'messy' look.
sensitivitynumber200Drag sensitivity for sending a card to the back.
sendToBackOnClickbooleanfalseWhen enabled, the stack also shifts to the next card on click.
cardsstring[][]The image URLs to display in the stack. Use the card slot to render something other than an image.
animationConfigobject{ stiffness: 260, damping: 20 }Configures the spring animation's stiffness and damping.
autoplaybooleanfalseWhen enabled, the stack automatically cycles through cards.
autoplayDelaynumber3000Delay in milliseconds between automatic card transitions.
pauseOnHoverbooleanfalseWhen enabled, autoplay pauses when hovering over the stack.
mobileClickOnlybooleanfalseOn screens narrower than mobileBreakpoint, disable dragging and send the card to the back on click.
mobileBreakpointnumber768Width in pixels below which mobileClickOnly applies.
SlotDescription
cardCustom card content. Receives the card value and its index.

Accessibility

Keyboard shortcuts and ARIA behavior.

  • Cards are not focusable. If the stack carries content people need, offer a keyboard alternative next to it, such as a button that calls the same action.