Card Flip
kokonut-ui/card-flipFreeComponent
Animated flip card with gradient button and animation.
Install it
npx shadcn@latest add https://kokonutui.com/r/card-flip.jsonSource
1"use client";23/**4 * @author: @dorianbaffier5 * @description: Card Flip6 * @version: 1.0.07 * @date: 2025-06-268 * @license: MIT9 * @website: https://kokonutui.com10 * @github: https://github.com/kokonut-labs/kokonutui11 */1213import { ArrowRight, Repeat2 } from "lucide-react";14import { useState } from "react";15import { cn } from "@/lib/utils";1617export interface CardFlipProps {18 title?: string;19 subtitle?: string;20 description?: string;21 features?: string[];22}2324export default function CardFlip({25 title = "Design Systems",26 subtitle = "Explore the fundamentals",27 description = "Dive deep into the world of modern UI/UX design.",28 features = ["UI/UX", "Modern Design", "Tailwind CSS", "Kokonut UI"],29}: CardFlipProps) {30 const [isFlipped, setIsFlipped] = useState(false);3132 return (33 <div34 className="group relative h-[320px] w-full max-w-[280px] [perspective:2000px]"35 onMouseEnter={() => setIsFlipped(true)}36 onMouseLeave={() => setIsFlipped(false)}37 >38 <div39 className={cn(40 "relative h-full w-full",41 "[transform-style:preserve-3d]",42 "transition-[transform] duration-500 ease-[cubic-bezier(0.77,0,0.175,1)]",43 "motion-reduce:transition-none",44 isFlipped45 ? "[transform:rotateY(180deg)]"46 : "[transform:rotateY(0deg)]"47 )}48 >49 <div50 className={cn(51 "absolute inset-0 h-full w-full",52 "[backface-visibility:hidden] [transform:rotateY(0deg)]",53 "overflow-hidden rounded-2xl",54 "bg-zinc-50 dark:bg-zinc-900",55 "border border-zinc-200 dark:border-zinc-800/50",56 "shadow-xs dark:shadow-lg",57 "transition-shadow duration-500",58 "group-hover:shadow-lg dark:group-hover:shadow-xl"59 )}60 >61 <div className="relative h-full overflow-hidden bg-gradient-to-b from-zinc-100 to-white dark:from-zinc-900 dark:to-black">62 <div63 aria-hidden="true"64 className="absolute inset-0 flex items-start justify-center pt-24"65 >66 <div className="relative flex h-[100px] w-[200px] items-center justify-center">67 {[...Array(10)].map((_, i) => (68 <div69 className={cn(70 "absolute h-[50px] w-[50px]",71 "rounded-[140px]",72 "animate-[scale_3s_linear_infinite]",73// … truncated
What it pulls in
npm packages
Files it writes
More from kokonut-ui
All 40 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Action Search Baraction-search-bar | kokonut-ui | Components | Free | 2 deps · 2 files | |
| AI Input Searchai-input-search | kokonut-ui | Components | Free | 1 dep · 2 files | |
| AI State Loadingai-loading | kokonut-ui | Components | Free | 1 dep | |
| AI Input Selectorai-prompt | kokonut-ui | Components | Free | 2 deps · 4 files | |
| AI Text Loadingai-text-loading | kokonut-ui | Components | Free | 1 dep | |
| AI Voiceai-voice | kokonut-ui | Components | Free | 2 deps | |
| Apple Activity Cardapple-activity-card | kokonut-ui | Components | Free | 1 dep | |
| Magnet Buttonattract-button | kokonut-ui | Components | Free | 2 deps |
