Skip to content
VenusUI
Get started

Holo Card

A payment card with a holographic foil that follows the pointer, and a flip to the back on click.

Preview

Installation

npx shadcn@latest add @venusui/holo-card

Run this in a project set up with shadcn. If you haven’t set it up yet, run npx shadcn@latest init first.

Files added to your project

Paths use the default shadcn aliases. The CLI follows the aliases in your components.json.

  • @/components/ui/holo-card.tsx

Usage

The code behind the preview above.

holo-card-demo.tsx

import { HoloCard } from "@/components/ui/holo-card"

export default function HoloCardDemo() {
  return <HoloCard className="w-[min(24rem,calc(100vw-3rem))]" name="Priya Natarajan" last4="4821" expires="08/29" brand="Aurora" />
}

API reference

PropTypeDefaultDescription
namestring—Card holder's name.
last4string—The last four digits; the rest show as dots.
expiresstring—Expiry, e.g. “08/29”.
brandstring"Aurora"Wordmark in the top corner.
cvcstring"123"Shown on the back. Use a placeholder, never a real code.
maxnumber14Largest tilt in degrees.

All <button> props except children; className sizes the card.

Requirements

  • React 19 and Tailwind CSS v4.

Customization

  • Change the card's colors in the front face's bg-[radial-gradient(...)] class, and the foil colors in its inline linear-gradient.
  • Use it for product pages, pricing or onboarding. Never display real card numbers.

Accessibility

  • It's a button with aria-pressed that flips the card; its label reads the brand, last four digits, name and expiry.
  • Touch and keyboard users get the flip; the tilt is pointer-only.
  • With reduced motion it neither tilts nor animates the flip.

Troubleshooting

The back shows through, or the flip looks flat.
A parent is flattening 3D (overflow-hidden or filter). Keep the card's wrapper free of those.
Unknown registry "@venusui"
Your shadcn CLI couldn’t find the namespace in the shadcn registry index. Use the latest CLI (npx shadcn@latest), install by URL, or register it with its address: npx shadcn@latest registry add @venusui=https://venusui.com/r/{name}.json.
No components.json found
Run npx shadcn@latest init in your project first.
Loading preview

A card that tilts toward the pointer while its layers rise off the surface, each to its own depth.

Loading preview

A card that tilts in 3D toward the pointer, with a glare that follows it.

Loading preview

Cards arranged in a ring that turns in 3D, with buttons, arrow keys and announcements.