Skip to content
WANCRAFT

H.1813D & Experimental

Holo Card

A holographic foil card that tilts toward the pointer while rainbow foil, glitter and glare shift with the light.

NewReactMotionCSSTailwindadvanced

Overview

Holo Card turns any content into a collectible-style card with a holographic finish. The pointer tilts the card on springs and moves a light across it; a wide rainbow foil gradient slides with the light through colour-dodge blending, a glitter layer made from thresholded fractal noise sparkles in the foil's colours, an optional stripe pattern catches the light like embossed foil, and a specular glare follows on top. All layers are plain CSS gradients and blend modes driven by motion values written to CSS variables, so the card never re-renders while you move. The card is focusable and runs a slow idle shimmer while focused; touch screens get the same gentle automatic shimmer without needing device orientation. With reduced motion it rests at a fixed angle with a calm, static foil.

01Installation

Method 01 · Registry

CLI verified

Uses the shadcn CLI in a project initialised with shadcn init. Installs the file to components/ui/holo-card.tsx and adds its dependencies.

npx shadcn@latest add https://wancraft.my/r/holo-card.json

Method 02 · Copy and paste

  1. 1. Install the dependencies below.
  2. 2. Copy the source from the Code tab into components/ui/holo-card.tsx.
  3. 3. Import it and adjust props.
npm install motion
Dependencies
motion
Peer
react ≥ 18, tailwindcss ≥ 4
Added
13 Oct 2026
Updated
—

02Usage

The default configuration. Change properties above to generate a tailored example in the Usage tab.

example.tsx
import { HoloCard } from "@/components/ui/holo-card";

export function HoloCardExample() {
  return (
    <HoloCard label="Meridian, card 07 of 40" className="aspect-[5/7] w-64">
      <div className="flex h-full flex-col justify-end p-5">
        <p className="text-2xl font-semibold text-white">Meridian</p>
        <p className="text-sm text-zinc-400">Signal class · 07/40</p>
      </div>
    </HoloCard>
  );
}

03Props

PropTypeDefaultDescription
childrenReactNode—Card art and content, rendered beneath the foil layers.
labelstring"Holographic card"Accessible name of the focusable card group.
intensitynumber0.7Foil strength, 0–1.
foil"spectrum" | "ember" | "silver""spectrum"Colour of the holographic foil.
pattern"plain" | "stripes" | "sparkles""sparkles"Extra shine pattern on top of the foil.
tiltStrengthnumber14Maximum tilt in degrees at the edges.
spring{ stiffness: number; damping: number; mass: number }{ stiffness: 170, damping: 18, mass: 0.6 }Spring for tilt, light and foil strength.
glarebooleantrueSpecular glare that follows the light.
roundednumber18Corner radius in px.
perspectivenumber900CSS perspective in px.
idleShimmerbooleanfalseShimmer while idle (always on for touch screens and while focused).
accentstring"#FF7448"Focus ring colour.
surfaceClassNamestringgraphite surfaceClasses for the card surface; replaces the default.

04Features

  • 01Spring-smoothed pointer tilt and light position, written to CSS variables — no re-renders on move
  • 02Layered foil: sliding rainbow gradient, glitter from thresholded fractal noise, optional stripe pattern
  • 03Colour-dodge and overlay blending, masked around the light so the foil blooms where it catches it
  • 04Specular glare following the light, plus a subtle lift on hover
  • 05Slow idle shimmer on focus and on touch screens (no device orientation needed); pauses offscreen and in hidden tabs
  • 06Three foils (spectrum, ember, silver) and a replaceable surface; children are the card art
motion · springmotion · continuousinput · pointerinput · hoverinput · focus

05Accessibility

  • The card is a focusable role="group" with an accessible name (label); its children keep their own semantics.
  • Keyboard focus shows an accent outline and starts a slow shimmer, so keyboard users see the effect too.
  • All foil, glitter and glare layers are aria-hidden and ignore pointer events.
  • Touch input never tilts the card, so it cannot fight page scrolling.
  • prefers-reduced-motion disables tilt and shimmer and shows a static, subtle foil.

06Limitations

  • Blend modes are tuned for dark card surfaces; very light surfaces wash the foil out.