Flood

No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/button-flood

About this component

A square outline button in black on white. Signal red floods in from whichever edge your pointer crossed and drains out through the edge it leaves by, while the arrow steps forward.

Triggers

  • Hover
  • Mouse tracking
  • Fill
  • State change

Techniques

  • Event position
  • Transform only
  • CSS transition
  • CSS variables

Difficulty

Intermediate

Accessibility

Keyboard and screen readers

A native button named by its label; the fill and arrow are aria-hidden. Keyboard focus shows the filled state and an outline.

Reduced motion

The colour change is instant.

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

More buttons

See all
FollowGet code
ForkGet code
FrostedGet code
GleamGet code