Soap film
Install with shadcn
Needs a free account token. Get a token
npx shadcn@latest add @movin/button-soap-filmAbout this component
A soap film stretched over a pearl pill, its interference colours swirling slowly in a WebGL shader. Hover and the film turns round your pointer and drains thin under it, like a breath on a bubble; click and it pops from that spot, a bright rim racing out and the film behind it settling to one even orchid, before a fresh film is drawn back across and drains to its colours.
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, Get started; the shader canvas is aria-hidden and the CSS gradient stands in until WebGL draws. A key press pops the film from the middle.
Reduced motion
The shader draws one still frame and hover and the pop are off.
Use it in anything you build, commercial and client work included. Licence