Hexagon

No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/button-hexagon

About this component

A flat-top hexagonal button using clip-path: polygon(). On hover, a circular silver fill expands from the center with a spring overshoot (cubic-bezier(0.34, 1.56, 0.64, 1)), inverting the text color from silver to near-black. The hex clip-path is applied to the button element itself. No dependencies.

Triggers

  • Hover

Techniques

  • clip-path
  • Transform only

Difficulty

Intermediate

Moves on

Its code uses this curve. Open one to see it plotted and tune it.

Accessibility

Reduced motion

Replace scale transition with a simple opacity transition on the fill layer.

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

More buttons

See all
Ink StampGet code
Jello WobbleGet code
Loading LockGet code