BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/tripled/credit-card-shadcnui

Credit Card

tripled/credit-card-shadcnui
FreeComponent

3D animated credit card with flip animation to show CVV

Install it

npx shadcn@latest add https://ui.tripled.work/r/credit-card-shadcnui.json

Source

@uitripled/react-shadcn/src/components/components/cards/shadcnui/credit-card.tsxui.tripled.work/r/credit-card-shadcnui.json · first 6 KB
1"use client";
2
3import {
4 motion,
5 useMotionValue,
6 useReducedMotion,
7 useSpring,
8 useTransform,
9} from "framer-motion";
10import { CreditCard as CreditCardIcon } from "lucide-react";
11import { useMemo, useState } from "react";
12interface CreditCardProps {
13 cardNumber?: string;
14 cardholderName?: string;
15 expiryDate?: string;
16 cvv?: string;
17}
18
19const gradients = {
20 front:
21 "linear-gradient(145deg, hsl(var(--primary) / 0.45), hsl(var(--primary) / 0.18))",
22 back: "linear-gradient(145deg, hsl(var(--primary) / 0.45), hsl(var(--primary) / 0.18))",
23};
24
25const overlayLights = [
26 "radial-gradient(circle at 20% 30%, hsl(var(--foreground) / 0.12), transparent 55%)",
27 "radial-gradient(circle at 80% 20%, hsl(var(--primary) / 0.22), transparent 60%)",
28 "radial-gradient(circle at 50% 80%, hsl(var(--accent) / 0.28), transparent 65%)",
29];
30
31export function CreditCard({
32 cardNumber = "4532 1234 5678 9010",
33 cardholderName = "JORDAN PARK",
34 expiryDate = "09/27",
35 cvv = "123",
36}: CreditCardProps) {
37 const [isFlipped, setIsFlipped] = useState(false);
38
39 const x = useMotionValue(0);
40 const y = useMotionValue(0);
41
42 const rotateX = useSpring(useTransform(y, [-0.5, 0.5], [6, -6]), {
43 stiffness: 280,
44 damping: 28,
45 });
46 const rotateY = useSpring(useTransform(x, [-0.5, 0.5], [-6, 6]), {
47 stiffness: 280,
48 damping: 28,
49 });
50
51 const shouldReduceMotion = useReducedMotion();
52
53 const overlayGradient = useMemo(() => overlayLights.join(","), []);
54
55 const handleMouseMove = (event: React.MouseEvent<HTMLDivElement>) => {
56 if (shouldReduceMotion) return;
57 const rect = event.currentTarget.getBoundingClientRect();
58 const width = rect.width;
59 const height = rect.height;
60 const mouseX = event.clientX - rect.left;
61 const mouseY = event.clientY - rect.top;
62 const xPct = mouseX / width - 0.5;
63 const yPct = mouseY / height - 0.5;
64 x.set(xPct);
65 y.set(yPct);
66 };
67
68 const handleMouseLeave = () => {
69 x.set(0);
70 y.set(0);
71 };
72
73 const formatCardNumber = (number: string) => {
74 return number.replace(/(.{4})/g, "$1 ").trim();
75 };
76
77 return (
78 <div className="flex items-center justify-center p-8 perspective-1000">
79 <motion.div
80 onMouseMove={handleMouseMove}
81 onMouseLeave={handleMouseLeave}
82 onClick={() => setIsFlipped(!isFlipped)}
83 className="relative h-[240px] w-[380px] cursor-pointer"
84 style={{
85 rotateX,
86 rotateY,
87 transformStyle: "preserve-3d",
88 }}
89// … truncated

What it pulls in

npm packages

  • framer-motion
  • react

Files it writes

  • @uitripled/react-shadcn/src/components/components/cards/shadcnui/credit-card.tsx

Facts

Registry
tripled
Type
registry:component
Access
Free
Files written
1
Licence
MIT
In the index
at or before 2026-08-10
Last confirmed
3 days ago

Go to the source

ui.tripled.work moumen-soliman/uitripled on GitHub Raw registry item This item as JSON

More from tripled

All 282 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
AI Chat Interfaceai-chat-interface-shadcnuitripledComponentsFree2 deps
AI Glow Inputai-glow-input-shadcnuitripledComponentsFree2 deps
AI Loading Skeletonai-loading-skeleton-shadcnuitripledComponentsFree2 deps
AI Response Typing Streamai-response-typing-shadcnuitripledComponentsFree2 deps
AI Unlock Animationai-unlock-animation-shadcnuitripledComponentsFree2 deps
Animated Accordionanimated-accordion-shadcnuitripledComponentsFree2 deps
Animated Card Stackanimated-card-stack-baseuitripledComponentsFree2 deps
Animated Card Stackanimated-card-stack-shadcnuitripledComponentsFree2 deps

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

ToolDrift

What the AI coding tools changed last night

tooldrift.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex