Sprout

No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/checkbox-sprout

About this component

Checking plants a seed: the box fills and ticks, then a stem grows up out of its top edge and two leaves unfurl one after the other before the little plant starts to sway. Unchecking pulls the sprout back into the soil.

Triggers

  • Click
  • State change
  • Draw
  • Spring
  • Delay stagger

Techniques

  • SVG stroke
  • stroke-dashoffset
  • Spring
  • Keyframes
  • Transition delay stagger

Difficulty

Intermediate

Accessibility

Keyboard and screen readers

A native checkbox inside a <label>, so "Plant a tree" is its name. The plant and box are aria-hidden.

Reduced motion

The plant appears at once and never sways.

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

More checkboxes

See all
StitchGet code
Strike TaskGet code
BounceGet code
ChargingGet code