Hologram Card
A 3D-tilting card with iridescent foil and a moving glare.
Installs motion.
Kowloon Nights
HoloSignage, 1987Nathan Road
Eleven thousand tubes along one road, bent by hand and lit at dusk. Most went dark in 2019.
- Tubes
- 412
- Volts
- 9 kV
- Lit
- 32 yrs
Neon Archive, series 107/24
Installation
npx shadcn@latest add https://neonkit.heyaadi.com/r/hologram-card.jsonUsage
import { HologramCard } from "@/components/ui/hologram-card"
<HologramCard className="aspect-[5/7] w-64 p-5">
<h3>Kowloon Nights</h3>
</HologramCard>Examples
Foils
The texture the sheen catches on: fine lines, a dot screen or glitter. Smooth drops the texture.
Member pass
A gentler maxTilt suits wide cards.
As a link
Put a link inside. Tabbing to it tilts the card to a still pose and lights the foil.
API reference
Also accepts div attributes, and the ref points at the card. className and style go to the card face, so size, padding, radius and background all work as usual.
| Prop | Type | Default |
|---|---|---|
maxTilt | numberLargest tilt in degrees, reached at the card's edges. | 12 |
foil | "lines"Texture the rainbow sheen catches on. | "lines" |
intensity | numberStrength of the sheen and glare, 0 to 1. | 1 |
glare | booleanA soft spot of light that follows the pointer. | true |
color | NeonColorTints the foil, the edge light and the glow around the card. | inherited |
Accessibility
- Every light layer is aria-hidden and ignores the pointer, so links, buttons and text inside behave normally.
- Keyboard focus inside the card (focus-visible only) tilts it a few degrees to a fixed pose; it settles when focus leaves.
- Mouse, pen and touch all tilt it. On touch the page can still scroll, and the card settles when the finger lifts.
- With reduced motion the card never tilts or tracks the pointer; the foil keeps a still sheen.
- Tilt, glare and sheen move with transforms driven by springs, without re-rendering React while the pointer moves.
- Don't put overflow-hidden on the card itself: it clips the light the card throws around it. The foil layers already clip to the rounded corners.