crucıble

Bevel

A glass-refraction surface card: backdrop-blurred glass with a multi-layer bevel edge, a slow glacial-cyan caustic drifting along the top rim, and a refracted offset highlight that slides with a subtle perspective tilt on hover. Pure CSS with eased custom-property transitions; static caustics and no tilt under reduced motion; a ghost light idles across the glass when untouched.

cssfree

Installation

CLI

npx shadcn@latest add @crucible/bevel

Props

PropTypeDefaultDescription
childrenReact.ReactNodeCard content.
tiltnumber6Maximum tilt, in degrees, on either axis at the card's edge. Subtle by design.
causticColorstringglacial cyanColor of the caustic light on the bevel edges and the internal refracted highlight.
blurnumber16Backdrop blur in px — how strongly the glass frosts whatever sits behind it.
idlebooleantrueIdle autoplay: after 1.5s with no pointer on the card, a slow ghost light drifts across it — a gentle tilt and sliding caustic at reduced strength — so the glass never reads as dead. A real pointer takes over instantly. Off under reduced motion; sleeps offscreen.
Also accepts all props of React.ComponentPropsWithoutRef<"div"> — they pass through to the underlying element.

Honors prefers-reduced-motion with a designed static fallback, and passes className through.