Swipe Card
Use this card for highlighting Product
Showcases, Images, and Flashcards with an interactive, swipeable card interface.
Installation
npx @ayushmxxn/serenity-ui@latest add swipecard
Usage
import React from 'react';
import SwipeCards from './components/ui/SwipeCards';
const Cards = [
{
id: 1,
z: 1,
img: "https://images.unsplash.com/photo-1712820504667-8952366b02d3?q=80&w=1887&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
},
{
id: 2,
z: 2,
img: "https://images.unsplash.com/photo-1719776555224-75afcc74d03b?q=80&w=1887&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
},
{
id: 3,
z: 3,
img: "https://images.unsplash.com/photo-1653199898411-b93028f1a916?q=80&w=1964&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
},
{
id: 4,
z: 4,
img: "https://images.unsplash.com/photo-1697468792373-ad4181550a5a?q=80&w=1887&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
},
{
id: 5,
z: 5,
img: "https://images.unsplash.com/photo-1697577504575-5bee362e57a2?q=80&w=1887&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
},
];
const Page = () => {
return (
<div className='mt-10'>
<SwipeCards cards={Cards} />
</div>
);
};
export default Page;
Props
Prop Name | Type | Description |
---|---|---|
id | number | Unique identifier for the card |
z | number | Stack order of the card |
img | string | URL of the image displayed on the card |