Skip to content

Glass Shatter

A click cracks the glass from that point; the shards fall with physics and then snap back together.

Plan
Pro · commercial license
Dependencies
React only
Props
10 (9 adjustable)

Included in Pro and Lifetime. See pricing

Break the glass
Click the glass

Made with Furin: Pill Nav · Metal Button · Copy Morph

Props

PropTypeDefaultDescription
childrenReactNode""Content that sits behind the glass.
piecesnumber9Crack radii; more radii, more shards.
gravitynumber1Multiplier for the gravity on the shards.
autobooleanfalseBreaks the glass on its own every so often while nobody touches it.
autoDelaynumber3200Wait between automatic breaks, in ms.
scenebooleanfalseDraws a color scene behind the glass.
soundbooleanfalseSynthesized glass-breaking sound (only after a click).
insetnumber22Margin between the edge and the glass panel, in px.
radiusnumber26Corner radius of the panel, in px.
hintstring"Click the glass"Small phrase at the bottom that fades once the glass breaks (empty to hide it).

Installation

With your license

1Set up the Pro registry once

Pro components aren't on npm or in the public shadcn registry: you install them with your license from Furin's private registry.

Use my license

2Install Glass Shatter

npx shadcn@latest add @furin-pro/glass-shatter

Dependencies

React
18 or later
Other libraries
none
License
commercial

Pro components install into your project: the code is yours and there's nothing else to download.

Keep exploring

  • A wave of liquid glass between two sections that refracts both and slides with the cursor.

    Glass

  • A drop of liquid glass follows the cursor and merges with the edges of buttons, stretching like a liquid.

    Glass

  • A fluted glass panel that splits the content behind it into refracted strips that move with the cursor.

    Glass