Skip to Content
Kokonut UI

CD-01Cards

Flick Card

A two-sided card you spin with a drag or a flick, with thickness, light and a floor shadow that follow the angle.

Install with
no extra packages

PROOnboarding Checklist and more like it are in Kokonut UI Pro

Installation

Flick Card is a free, open-source React component in the Kokonut UI Cards collection. Add it with the shadcn CLI, which copies the source into components/kokonutui/card-flip.tsx, so the code is yours to change.

npx shadcn@latest add @kokonutui/card-flip

Usage

import CardFlip from "@/components/kokonutui/card-flip";

export default function Example() {
  return <CardFlip />;
}

Props

front
ReactNode

Front face. Defaults to an event ticket.

back
ReactNode

Back face. Defaults to the ticket's entry code and seat.

flipped
boolean

Controlled side: true shows the back.

defaultFlipped
booleanDefault false

Starting side when uncontrolled.

onFlippedChange
(flipped: boolean) => void

Called when a drag, click or key turns the card to the other side.

axis
AxisDefault "y"

"y" spins left and right like a coin, "x" tumbles top over bottom.

label
stringDefault "Event ticket"

Accessible name of the card.

className
string

Extra classes for the root element.

faceClassName
string

Classes for both faces, such as background, border and radius.

Axis

type Axis = "x" | "y";

Dependencies

NeedsVersionComes from
cn from lib/utils.tsshadcn init
React19Your app
Tailwind CSS4Your app

No provider, font or global CSS to set up: the file works as soon as it lands.