About
An interactive fanned card deck that continuously flings the front card out to the bottom-left and tucks it smoothly behind the stack, with instant rapid-click, drag-to-flick, and keyboard navigation.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Card Shuffle Deck to your project and fits it to your theme.
Code
How Card Shuffle Deck is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
"use client";
import React from "react";
import {
CardShuffleDeck,
type CardShuffleTheme,
} from "@/components/ui/card-shuffle-deck";
const settings = {
autoPlay: true,
interval: 2100,
pauseOnHover: true,
interactive: true,
theme: "auto",
};
const VALID_THEMES: CardShuffleTheme[] = ["auto", "light", "dark"];
export default function CardShuffleDeckDemo(
props: Partial<typeof settings>
) {
const config = { ...settings, ...props };
const theme: CardShuffleTheme = VALID_THEMES.includes(
config.theme as CardShuffleTheme
)
? (config.theme as CardShuffleTheme)
: "auto";
const safeInterval =
typeof config.interval === "number" && Number.isFinite(config.interval)
? Math.max(900, Math.min(config.interval, 8000))
: settings.interval;
return (
<div className="flex min-h-[440px] w-full items-center justify-center p-6 sm:p-10">
<CardShuffleDeck
autoPlay={Boolean(config.autoPlay)}
interval={safeInterval}
pauseOnHover={Boolean(config.pauseOnHover)}
interactive={Boolean(config.interactive)}
theme={theme}
/>
</div>
);
}
export { CardShuffleDeckDemo as Demo, CardShuffleDeckDemo as demo };






