crucıble

Cullet

Liquid-glass surface primitive: backdrop blur plus an SVG feDisplacementMap generated from the element's own size — edge-weighted refraction with a per-channel prismatic split, a cyan/magenta chromatic rim, a pointer-leaning specular highlight and a surface-tension wobble. Render it as a pill, rounded tile, circle, button or link; CulletLens is a pointer-following magnifier with idle drift and keyboard walking. Refraction renders in Chromium; Safari and Firefox fall back to frosted blur + rim.

csspro

Installation

CLI

npx shadcn@latest add @crucible/cullet

Props

PropTypeDefaultDescription
childrenReact.ReactNodeContent floated on the glass — a label, an icon, a whole card.
as"div" | "button" | "a" | "span" | "section" | "article" | "figure" | "li""div"Element to render. Keyboard behaviour and roles come from it: "button" is a native button, "a" a link (pass href).
shapeCulletShape"pill"Silhouette: fully rounded pill, a soft rounded rect, or a circle (forced 1:1).
strengthnumber1Refraction strength multiplier — how far the rim bends what is behind it. 0 disables bending.
blurnumber2Backdrop blur, in px. Liquid glass stays mostly clear; raise for frost.
tintstring"rgba(255,255,255,0.06)"Fill colour laid over the refracted backdrop (any CSS colour; keep alpha low).
chromaticnumber1Chromatic rim + channel-split intensity, 0–2.
bezelnumber0.6Width of the refracting bezel as a fraction of the shorter half-side, 0.1–1.
wobblebooleantrueSurface-tension wobble on hover, press, pointer motion and resize. Ignored under reduced motion.
refractionCulletRefraction"auto"SVG displacement mode. "auto" enables it only where it renders (Blink); Safari and Firefox fall back to blur + rim.
hrefstringLink target when as="a".
targetstringLink target window when as="a".
relstringLink rel when as="a".
type"button" | "submit" | "reset""button"Button type when as="button".
disabledbooleanDisables the button when as="button".
refReact.Ref<CulletHandle>Imperative handle — see CulletHandle.
Also accepts all props of Omit<React.HTMLAttributes<HTMLElement>, "children"> — they pass through to the underlying element.

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