Overview
Import ZuiGlassCard from the glass-card entry and compose ZuiGlassCard.Content inside it. The root forwards div attributes and refs. Material variant, color appearance, and size can be chosen independently.
The defaults are intensity 12, perspective 1000, scale 1.02, glare true, glareIntensity 0.15, glow false, glowIntensity 0.2, depth 20, floating false, disabled false, and interactive true. Glare follows the cursor; glow is ambient. Floating requires a visible card and a fine hover pointer.
Consumers using Tailwind v4 must include the package in their @source scan so both light and dark token classes are generated. The static entry is safe to server-render, and all browser interaction is initialized after mounting.
Use the compound ZuiGlassCard.Content API inside a client component. In a Next.js Server Component, import the named GlassCardContent export instead; the server can compose the two client boundaries without accessing a client component property.
Common use cases
- Feature and product highlights.
- Membership and profile surfaces.
- Interactive dashboards and portfolio cards.
FAQ
Does Glass Card require Framer Motion or WebGL?
No. It uses CSS transforms and gradients with frame-rate independent interpolation. It adds no animation dependency.
How does it behave on touch devices?
Touch pointers do not tilt the card. The glass appearance and all child controls remain available.
Can reduced motion be overridden?
No. OS reduced-motion preferences always take precedence. You can also set reducedMotion to true to force movement off.