Skip to content

No.01 · Buttons

Glassbreak Button

A solid plate that fractures from one impact point, cracks racing outward as the shards drift apart.

The prompt

Copy this text

Automatic copying is unavailable. Copy the selected text using your device’s copy command.

Written for the variant you picked above: Light surface

Create a rectangular, square-cornered CTA button (56px tall, 28px horizontal padding, 600-weight label followed by a thin square-capped arrow) that looks like a solid pane of dark glass. On hover or keyboard focus it shatters from a single impact point just below centre (50%, 52%): 1. The whole plate dips to 98.5% scale and back over 280ms — the moment of impact. 2. Six hairline cracks draw outward from the impact point using stroke-dashoffset on an SVG stretched to the button (preserveAspectRatio="none"), each 420ms, staggered 40ms + 45ms per crack. 3. A solid cover layer that hides the shard seams fades out over 400ms after an 80ms delay. 4. Six shards — fixed clip-path polygons that tile the button and all meet at the impact point — drift 4–8px away from the centre and rotate ±0.8–2.2° over 550ms (cubic-bezier(0.2,0.7,0.1,1)), with staggered delays between 160ms and 320ms. Three of the shards are a slightly different shade so the break reads as faceted glass. 5. Beneath the shards, a diagonal gradient plate (night → deep ocean blue) shows through the gaps. 6. The arrow slides 4px forward. No randomness, no JavaScript animation — the break is choreographed so it looks identical every time. Provide a "light" surface (dark glass, bone text) and a "dark" surface (bone glass, amber cracks). Disabled buttons never break. On touch devices and narrow screens show the button already shattered so the idea survives without hover; full-width buttons stay whole. Under reduced motion it becomes a plain solid button. Selected variant — Light surface (light): Apply the light surface theme. Where the brief above gives no colour values for it, choose a restrained light surface palette with text at 4.5:1 contrast or better. Keep the geometry, states and motion described above unchanged. This selection takes precedence over references to other themes or options in the general brief. Implement this selected appearance; do not add a variant picker or alternative appearances unless requested. Implementation requirements: Use React and TypeScript. Keep the component self-contained, with uniquely scoped CSS and no animation libraries. Include required imports, styles and font setup in the result. Interaction: Shatters on hover and on :focus-visible, reassembles on leave. The staggered delays apply both ways, so the shards settle back in a different order than they left. Motion: Impact dip 280ms → cracks draw 420ms (staggered 40–265ms) → cover fades 400ms → shards drift 550ms (160–320ms delays). All CSS transitions/keyframes. Accessibility: Renders a real <button> (or <a> when href is set). Focus-visible triggers the same shatter plus a 2px outline. Decorative layers are aria-hidden; the label stays on top at z-index 2 for contrast in every state. Responsive behavior: Fixed height, intrinsic width; `fullWidth` stretches it. Compact size (44px) for navbars. Touch: At ≤767px or on coarse pointers the button renders pre-shattered — the cracked glass becomes the resting look. Preserve keyboard access, visible focus and reduced-motion behavior. Keep fictional demo data and simulated service calls in a separate usage example; expose callbacks for real actions and recover from rejected requests. Keep usage-example links inside the demo: use local buttons or prevent navigation. Demonstration links must not navigate to Vitrine routes or open other pages; preserve real URL support in the reusable component itself. Verify the result at narrow and wide viewport sizes, with keyboard input and reduced motion enabled.

Notes

Interaction
Shatters on hover and on :focus-visible, reassembles on leave. The staggered delays apply both ways, so the shards settle back in a different order than they left.
Motion
Impact dip 280ms → cracks draw 420ms (staggered 40–265ms) → cover fades 400ms → shards drift 550ms (160–320ms delays). All CSS transitions/keyframes.
Accessibility
Renders a real <button> (or <a> when href is set). Focus-visible triggers the same shatter plus a 2px outline. Decorative layers are aria-hidden; the label stays on top at z-index 2 for contrast in every state.
Responsive
Fixed height, intrinsic width; `fullWidth` stretches it. Compact size (44px) for navbars.
On touch
At ≤767px or on coarse pointers the button renders pre-shattered — the cracked glass becomes the resting look.