Prism Card
Tilts toward the pointer and bends a band of spectrum across its face.
PROGet Prism Card and 168 other Pro components with pro lifetime — Get Pro
- Category
- Creative
- Access
- ProPro · unlocked
- Source
- 129 lines · one file
- States
- 5 drawn
The decision inside it
The colour follows the angle, not the cursor
The spectrum is strongest at steep angles and nearly gone face-on, the way foil behaves, so a card at rest looks like a card. Tilt, glare and colour ride one spring and never lag each other. A tap rocks it once on touch; reduced motion keeps it flat.
When to use it
Use Prism Card to make one card feel physical: a membership pass, a pricing tier, a product shot. It tilts toward the pointer with a holographic sheen.
Installation
How you get it
Paste this into Claude Code, Cursor, Codex or any coding agent. It installs the file and uses it as it is, instead of writing a new one.
Use Liro's Prism Card for this.
Install it: npx shadcn@latest add @liro/prism-card
(the @liro registry is set up in components.json, with LIRO_KEY in .env.local)
Import it from @/components/ui/prism-card.
Do not rewrite or restyle it. Pass my data through its props
and keep its built-in states.For the full brief with every prop and the mistakes assistants usually make, use Copy prompt above. Pro components install through the @liro registry with your CLI token: see the Namespaced tab.
Usage
import { PrismCard } from "@/components/ui/prism-card";
export function MemberPass() {
return (
<PrismCard className="aspect-[1.586] w-[360px] bg-neutral-900 p-5 text-white">
<p className="font-semibold">Madgixs Founders</p>
<p className="mt-auto font-mono">0042 · 2026</p>
</PrismCard>
);
}API reference
“Copy prompt” above puts a full brief on your clipboard, install command, dependencies, props, and the mistakes an assistant usually makes with this component.
Props
Read from the component’s own TypeScript interface when the site is built, so this table cannot drift from the file you install.
| Type | Notes | ||
|---|---|---|---|
maxTilt | number | No | Largest tilt, in degrees. Default 12. |
intensity | number | No | How strong the spectrum is at full tilt, 0 to 1. Default 0.32. |
Dependencies
npm packages
clsxframer-motiontailwind-mergeLiro foundations, installed alongside it
liro-themeStates
All of them are drawn by the component. None is left for you to design.
- Rest
- Tilting
- Focused
- Tap rock
- Reduced motion
Accessibility
- Keyboard reachable throughout, in visual order
- Focus trapped in overlays, Escape closes them
- Focus returns to whatever opened it
- Live regions announce what changed, not that something did
- Honours prefers-reduced-motion
Responsive behavior
- Sizes to its container, not the viewport
- Usable from 320px up
- Pointer-based interaction, so trackpad and touch both work
- No hover-only affordances