Swipe Deck

Pro

Swipeable card stack where the top card hangs from the point you grab and stamps fade in as you drag. Flick it away on your own momentum, tap to page through photos, and undo flies it back in.

Preview

Installation

npx @lumioui/cli add pro/swipe-deck

Usage

import { SwipeDeck, SwipeDeckPhotos } from "@/components/ui/swipe-deck/swipe-deck";
<SwipeDeck />

Also exported: SwipeDeckPhotos.

Examples

Dating

A dating app's discover stack.

Jobs

A job-matching stack.

Recipes

Building this week's meal plan.

API reference

Prop Type Default
photos* (string | ImageSourcePropType)[]

Image URIs or sources, first shown first.

—
defaultPage number

Initial photo. Default 0.

0
onPageChange (page: number) => void —
children
React.ReactNode | ((page: number) … React.ReactNode | ((page: number) => React.ReactNode)

Drawn over the photo (name, details). A function gets the current page, so each photo can carry its own caption.

—
className string —