Vials

Reagent
No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/radio-vials

About this component

Four test tubes in a rack, each with a little coloured liquid at the bottom. The one you pick fills nearly to the lip and starts to fizz; the last one drains back down.

Triggers

  • Click
  • State change
  • Fill
  • Loop

Techniques

  • CSS transition
  • Keyframes
  • Radial gradient
  • CSS variables
  • Pseudo elements

Difficulty

Intermediate

Accessibility

Keyboard and screen readers

Native radios in a fieldset with a visually hidden legend ("Reagent"), each in a <label> and named by aria-label (Rose, Amber, Mint, Indigo); the tubes and rack are aria-hidden. :focus-visible outlines the tube.

Reduced motion

The fill is instant and the fizz is switched off.

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

More radios

See all
Shipping
VitroGet code
Delivery window
WashGet code
Note
XyloGet code
Source
Y2KGet code