Holo Card
A collectible trading card with real 3D tilt, holo foil, rarities, a flip side — and an anime Shinigami edition.
- Zero dependencies
- React + Tailwind
- Accessible
- Reduced-motion aware
Preview
Rare · Line-foil holo profile card. rarity="rare"
The card tilts toward your cursor, a rainbow foil shifts with the viewing angle (masked to fine diagonal lines like real holo stock), a glare follows the light, and the avatar and name float above the surface at different depths.
Installation
$ npx shadcn@latest add https://pickui.guetix.com/r/holo-card.json
Uses the shadcn CLI. It creates components/pickui/holo-card.tsx and installs nothing else.
Usage
example.tsx
Portfolio heroTeam pageGamified profileConference badge
Under the hood
The details that make it feel right, and that a one-line prompt usually misses:
- 01Foil = rainbow gradient × line mask × radial mask composited with `mask-composite`.
- 02Pointer math writes CSS variables directly, so there are no React re-renders while you move the cursor.
- 03Depth uses `preserve-3d` + per-layer `translateZ`; it springs back with a different easing than it tracks.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| name | string | — | Display name. |
| role | string | — | Role / title under the name. |
| avatar | string | — | Image URL. Falls back to initials. |
| handle | string | — | Small handle at the bottom. |
| stats | { label: string; value: string }[] | [] | Up to three stats. |
| serial | string | "No. 001" | Serial printed on the card. |
| accent | string | "#4ade80" | Accent color (any CSS color). |
| maxTilt | number | 14 | Max tilt in degrees. |
| rarity | "rare" | "epic" | "legendary" | "rare" | Foil, frame and effects. |
| edition | "holo" | "shinigami" | "holo" | Profile card, or the anime death-god character card. |
| art | string | — | Shinigami edition: your own (licensed) character art URL. |
| bio / skills / ability | string / {label, level}[] / {name, text} | — | Back side content (click or Enter flips the card). |
| animated | boolean | true | false = the calm “Regular” version (no idle or ambient motion). |
Accessibility
- Focusable card with a full accessible label; focus applies a gentle tilt.
- Reduced motion disables the tilt.