crucıble

Glass

A self-contained glassmorphism theme preset — a frosted, translucent panel with a white top-edge highlight, soft inner glow, and 1px light border floating over a soft, vibrant blurred gradient ground that shows through, with nested glass chips for layered depth. A keyboard-operable radiogroup of mood chips re-tints the ground and accents live (Aqua / Violet / Peach) while the frost stays; reduced motion pins the drifting orbs to a calm static frosted frame.

motionpro

Installation

CLI

npx shadcn@latest add @crucible/glass

Manual — install dependencies, then copy the source

npm install motion

Props

PropTypeDefaultDescription
variantstringControlled active preset id (matches a preset's id).
defaultVariantstring"aqua" (first preset)Initial preset id when uncontrolled.
onVariantChange(id: string) => voidFires with the next preset id whenever the switcher changes.
presetsGlassPreset[]the three built-in moodsOverride the built-in preset set (chips + palettes).
colorsPartial<GlassPalette>Token overrides merged over the active preset — makes any palette reachable.
speednumber1Orb-drift speed multiplier.
intensitynumber1Frost blur + glow strength multiplier.
pausedbooleanfalseFreeze the ground at a static frosted frame.
taglinestring"OVERVIEW"Small mono label above the heading.
headingstring"Clearlight"Display heading.
descriptionstring"Frosted panels over soft light. Pick a mood."Body line under the heading.
statValuestring"98"Stat figure.
statLabelstring"CLARITY"Stat unit / label.
progressnumber0.72Progress fraction, 0–1, shown in the depth meter.
tagstring"LAYER 3"Small pill tag.
primaryLabelstring"Continue"Filled button label.
secondaryLabelstring"Dismiss"Ghost button label.
labelstring"Glassmorphism theme preset"Accessible label for the panel region.
switcherLabelstring"Theme mood"Accessible label for the switcher group.
Also accepts all props of Omit<React.ComponentPropsWithoutRef<"section">, "onChange">they pass through to the underlying element.

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