Component packs › Liquid Glass › Refract Card

Refract Card

Real refraction: the glass bends and color-splits the moving background as the card floats after your cursor.

Refract Card is a card from Liquid Glass, a component pack with 6 components: Glass that refracts, pours and ripples. Price: $2 for the whole pack.

Built with: WebGL refraction, chromatic edges, CSS fallback.

Code: React and Next.js (TypeScript), Vue 3, plain HTML/CSS/JS, Tailwind CSS v4 and Motion (motion.dev). No npm packages needed. Keyboard accessible, with a reduced-motion version, in dark and light.

Refract Card props

PropTypeDefaultDescription
titlestring
textstring
widthnumber520 × 340Scene size in CSS px. Default 520 × 340.
heightnumber
cardWidthnumber300 × 180Card size in CSS px. Default 300 × 180.
cardHeightnumber
autoplaybooleanShowcase mode: the card drifts by itself until the pointer arrives.

Methods on the ref

Use it in React

import RefractCard from './RefractCard';

<RefractCard />

The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.

More in Liquid Glass

Good for: Glassmorphism UI.