Meridian ClubMember since 2021
Mira Okafor
Lounge access, two guests
No. 0427

Code

<script src="/holo-card.free.js" defer></script>

<holo-card
  width="360"
  theme="light"
  tilt="12"
  strength="1"
>
  <!-- your card content -->
</holo-card>

In context

Meridian ClubMember since 2021
Mira Okafor
Lounge access, two guests
No. 0427
Membership pass, Sweep foil
Northern Lights
Print 12 of 50
Limited print, Facets foil Pro
Night SignalsSat 14 Feb
Row C, seat 18
Doors open at 19:30
Event ticket, Rings foil Pro

Install · Free Web Component

One file, no dependencies. Sweep preset, every other option included. Host it yourself so your visitors never load anything from our servers.

1. Install with one command — or download the file
shadcn CLI · React
npx shadcn@latest add https://www.ui-design.co/r/holo-card.json
2. Load it and use the element
HTML
<script src="/holo-card.free.js" defer></script>

<holo-card
  width="340"
  theme="light"
  tilt="12"
  strength="1"
>
  <!-- your card content -->
</holo-card>
3. React + TypeScript (optional)

The shadcn command adds a typed React wrapper for you. Using the file directly? Custom elements work in React as-is; for type checking add:

TypeScript
// holo-card.d.ts
declare namespace JSX {
  interface IntrinsicElements {
    'holo-card': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> & {
      width?: number | string;
      ratio?: number | string;
      theme?: 'light' | 'dark';
      tilt?: number | string;
      strength?: number | string;
      radius?: number | string;
    };
  }
}

Pro · React + TypeScript Pro

One payment of $4.99, yours forever. Use it in unlimited personal and commercial projects; no resale.

  • React component with TypeScript types, the shared WebGL core and the GLSL source
  • Rings and Facets foils, and the screen blend for foil over photos
  • The vanilla Web Component with every foil, a demo page, README and license

Attributes & props

NameTypeDefaultDescription
width number (px)340Card width; the height follows the ratio.
ratio number1.586Width / height. 1.586 is a bank card; under 1 gives a portrait card.
theme 'light' | 'dark''light'White porcelain or smoked card.
tilt number (deg)12How far it leans toward the pointer. 0 keeps it flat.
strength 0..1.51How strong the foil is.
radius number (px)20Corner radius.
idle booleantrueSways gently while nobody is touching it.
foil Pro'sweep' | 'rings' | 'facets''sweep'Foil pattern. Free build ships Sweep only.
blend Pro'auto' | 'screen''auto'Use screen when the card holds a photo.

The foil is drawn over your content and blended into it, so text stays sharp. Give an element the class holo__pop and it shifts a few pixels against the tilt, as if it sat above the card. Reduced motion turns off the idle sway and the spring; the card then follows the pointer directly. Without WebGL it keeps the tilt and shows a static pastel foil. All library components on a page share one WebGL context.

More components