Soap pump

No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/button-soap-pump

About this component

A pump bottle: press the head and it sinks, a blob of soap swells at the nozzle and drops with a splat, the level inside sinks a little and bubbles rise, and the bottle refills itself once it runs low.

Dependencies
None
Difficulty
Beginner
Reduced motion
Respected
Theme
Light and dark
Follows page color-scheme

Triggers2

  • Click
  • State change

Techniques4

  • CSS variables
  • Keyframes
  • CSS transition
  • Gradient

Accessibility

Keyboard and screen readers

A native button named "Wash" whose label carries the level; the bottle is aria-hidden.

Reduced motion

The level changes without transition and the drop is skipped.

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

More buttons

See all
StaplerGet code
TrampolineGet code
UnveilGet code
VelvetGet code