A 3D tilting card with a pointer-tracked holographic glare and texture overlay, built for membership cards, passes, and collectibles.
Import the HoloCard component and access all parts using dot notation.
import {HoloCard} from "@heroui-pro/react";
<HoloCard>
<HoloCard.Rotator>
<HoloCard.Frame>
<HoloCard.Surface>
<HoloCard.Inset />
<HoloCard.Pattern />
<HoloCard.Content />
<HoloCard.Shine>
<HoloCard.ShinePattern />
</HoloCard.Shine>
</HoloCard.Surface>
</HoloCard.Frame>
</HoloCard.Rotator>
</HoloCard>;Every layer is optional except Rotator, Frame, and Surface. Inset draws the
hairline border, Pattern is the static texture, and Shine is the pointer-tracked
holographic glare. Shine renders a ShinePattern for you unless you pass children.
HoloCard.Content is a full-bleed layer that drifts against the tilt. Render one per
band of the card and position it with flex utilities — the layer ignores the pointer so
stacked layers never block each other.
<HoloCard.Content className="flex-col items-center justify-center">
<span className="text-3xl font-bold text-white">Marcus Wong</span>
</HoloCard.Content>
<HoloCard.Content className="items-end justify-center pb-10">
<span className="text-sm text-white/40">Member #0999</span>
</HoloCard.Content>Set isInteractive={false} to freeze the card flat and unlit. The card also stays
static automatically when the user has prefers-reduced-motion enabled.
On touch devices, horizontal drags tilt the card while vertical drags keep scrolling the page.
.holo-card - Perspective wrapper; declares every customization variable.holo-card__rotator - 3D tilt layer.holo-card__frame - Fixed clipping bounds the tilted card moves within.holo-card__surface - The card body carrying the gradient background.holo-card__inset - Hairline border inside the card edge.holo-card__pattern - Static texture overlay beneath the content.holo-card__content - Full-bleed parallax layer for the card face.holo-card__shine - Holographic glare, blended over everything else.holo-card__shine-pattern - The texture the glare revealsSet these on the root (or any ancestor) to restyle the card without overriding classes.
| Variable | Default | Description |
|---|---|---|
--holo-card-width | 302px | Card width |
--holo-card-height | 453px | Card height |
--holo-card-radius | 20px | Card corner radius |
--holo-card-bleed | 36px | Slack around the card inside the clipping frame |
--holo-card-perspective | 600px | 3D perspective depth |
--holo-card-gradient | dark gradient | Card surface background |
--holo-card-inset-color | rgb(255 255 255 / .06) | Hairline border color |
--holo-card-pattern | CSS rainbow sheen | Texture image for both overlays |
--holo-card-pattern-size | auto | background-size for both texture layers |
--holo-card-pattern-opacity | 0.9 | Opacity of the holographic texture |
--holo-card-texture-opacity | 0.1 | Opacity of the static texture |
These are driven by pointer movement and are read-only: --holo-card-pointer-x,
--holo-card-pointer-y, --holo-card-background-x, --holo-card-background-y,
--holo-card-opacity.
The root component. Renders a div that owns pointer tracking and every CSS variable.
It shrink-wraps the card, so wrap it in a flex or grid container to position it.
| Prop | Type | Default | Description |
|---|---|---|---|
gradient | string | - | CSS background for the surface. Sets --holo-card-gradient |
patternSrc | string | - | Texture image URL for both overlays. Sets --holo-card-pattern |
patternSize | string | - | background-size for both overlays. Sets --holo-card-pattern-size |
isInteractive | boolean | true | Whether the card tilts and lights up on pointer move |
isDisabled | boolean | false | Disables pointer tracking, leaving the card flat and unlit |
parallaxStrength | number | 10 | How far HoloCard.Content layers drift against the tilt |
children | ReactNode | - | Card layers |
className | string | - | Additional CSS class |
Also supports all native div HTML attributes and Motion props.
The 3D tilt layer. Rotates around the card center as the pointer moves.
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | - | Frame element |
className | string | - | Additional CSS class |
Also supports all native div HTML attributes and Motion props.
Fixed clipping bounds that give the scaled, tilted card room to move.
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | - | Surface element |
Also supports all native div HTML attributes.
The card body. Carries the gradient background and clips every layer to the radius.
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | - | Card layers |
Also supports all native div HTML attributes.
Hairline border inset from the card edge. Renders no children.
Supports all native div HTML attributes.
Static texture overlay that sits beneath the content. Renders no children.
Supports all native div HTML attributes.
A full-bleed parallax layer for the card face. Render as many as you need.
| Prop | Type | Default | Description |
|---|---|---|---|
parallax | boolean | true | Whether the layer drifts against the tilt |
children | ReactNode | - | Layer content |
className | string | - | Additional CSS class |
Also supports all native div HTML attributes and Motion props.
The pointer-tracked holographic glare. Renders a HoloCard.ShinePattern when no children are given.
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | <ShinePattern /> | Replaces the default texture |
Also supports all native div HTML attributes.
The texture the glare reveals, parallaxed by the pointer. Renders no children.
Supports all native div HTML attributes.