Fluted

No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/button-fluted

About this component

Reeded glass over coloured light, drawn by a WebGL shader: each rib is a lens that bends the blue, pink and amber lights behind it and splits them into colours at its edges. A pink light drifts behind the reeds; hover and it follows your pointer, smeared rib by rib; click and a white light runs out behind the glass to both ends, each rib catching it in turn.

Triggers

  • Hover
  • Click
  • Mouse tracking
  • Continuous

Techniques

  • requestAnimationFrame
  • Event position
  • Gradient

Difficulty

Advanced

Accessibility

Keyboard and screen readers

A native <button> named by its label, Continue; the shader canvas is aria-hidden and the CSS gradient stands in until WebGL draws. A key press sends the light from the middle.

Reduced motion

The shader draws one still frame and hover and the light run are off.

Use it in anything you build, commercial and client work included. Licence

More buttons

See all
GeodeGet code
MercuryGet code
PiñataGet code
SlotGet code