Skip to Content
✨ QuickCode UI keeps growing! More components, more features, and more ways to make your projects shine. Stay tuned & maybe… hire me or sponsor me 😉 
DocumentationSwipeStack

SwipeStack

A flexible, swipeable stack component for creating interactive card-based UIs — great for Tinder-style layouts, quizzes, or deck interactions.

Install Dependencies

npx
quickcode-ui add SwipeStack

Examples

Swipe Stack

Mountain Adventure

Explore breathtaking peaks

Ocean Paradise

Dive into crystal waters

Urban Exploration

Discover city landscapes

Desert Dreams

Wander through golden dunes

Forest Retreat

Find peace among trees

Props

SwipeStack

PropTypeDefaultDescription
childrenReact.ReactNodeStack items to render
classNamestringAdditional CSS classes for the container

SwipeStack.Item

PropTypeDefaultDescription
idstringUnique identifier for the item
isActivebooleanfalseWhether this card is currently active
indexnumber0Position in the stack (used for rotation)
totalItemsnumber1Total number of items in the stack
onSwipe(id: string, direction: "left" | "right") => voidCallback triggered when an item is swiped
onSwipeComplete(id: string) => voidCallback when swipe animation completes
childrenReact.ReactNodeContent inside the card
classNamestringAdditional CSS classes for styling

SwipeStack.Image

PropTypeDefaultDescription
srcstringImage URL for the background
altstring""Alt text for the image
classNamestringAdditional CSS classes for customization

SwipeStack.Overlay

PropTypeDefaultDescription
childrenReact.ReactNodeOverlay content (e.g., title, button)
classNamestringAdditional CSS classes for styling

Last updated on