Segment

Range
No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/radio-segment

About this component

A segmented control with a coloured thumb: three segments in a sunken track, and a coral-to-pink thumb that glides to the one you pick.

Triggers

  • Click
  • State change
  • Hover
  • Spring
  • Gradient

Techniques

  • Transform only
  • CSS transition
  • Gradient

Difficulty

Beginner

Accessibility

Keyboard and screen readers

Native radios in a fieldset with a visually hidden legend ("Range"), each in a <label> whose visible text is its name (Day, Week, Month); the thumb is aria-hidden. :focus-visible outlines the segment.

Reduced motion

The thumb jumps instead of gliding.

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

More radios

See all
Are you coming?
SketchGet code
Payment method
SlabGet code
Fan mode
SoftGet code
Stake
StakeGet code