Membrane

No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/button-membrane

About this component

The button is a rubber skin drawn as an SVG path. Leave it and the edge you exit through stretches after the cursor until it lets go and wobbles home on a spring; a press squishes every side inwards and the release boings. A small rAF spring integrator, no dependencies.

Triggers

  • Hover
  • Spring
  • Mouse tracking
  • Morph

Techniques

  • SVG
  • requestAnimationFrame
  • Spring
  • Mouse tracking
  • Event position

Difficulty

Advanced

Accessibility

Keyboard and screen readers

A real <button>, so keyboard and focus ring are native.

Reduced motion

The skin is never drawn and the plain rounded button stays.

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

More buttons

See all
Morph TextGet code
Particle TextGet code
Pull CordGet code
ShatterGet code