Golf club

No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/radio-golf

About this component

A golf club picker that plays the shot: the driver goes long and low past the flag, the iron climbs and drops by the pin, the putter just rolls, each with its trace drawing behind the ball.

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

Triggers4

  • Click
  • State change
  • Draw
  • Loop

Techniques4

  • SVG
  • stroke-dashoffset
  • Keyframes
  • CSS transition

Accessibility

Keyboard and screen readers

A role="radiogroup" with an aria-label around native radio inputs sharing one name, so the arrow keys move the choice and Tab enters the group once; :focus-visible on the input outlines its option.

Reduced motion

The shot does not play; the ball rests at the end of its trace.

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

More radios

See all
GradientGet code
HeadlightsGet code
Icon styleGet code
Keyboard layoutGet code