Slab

Payment method
No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/radio-slab

About this component

Payment options as white slabs with heavy black borders and hard offset shadows. The one you pick slams down onto its shadow, turns acid lime, fills its marker and stamps a tick at the end.

Triggers

  • Click
  • State change
  • Border

Techniques

  • CSS transition
  • Transform only
  • SVG
  • Pseudo elements

Difficulty

Beginner

Accessibility

Keyboard and screen readers

Native radios in a fieldset with a visually hidden legend ("Payment method"), each inside a <label> and named by its visible text; the marker and tick are aria-hidden. The focused slab is outlined.

Reduced motion

The transitions are switched off and the slab jumps to its pressed state.

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

More radios

See all
Fan mode
SoftGet code
Stake
StakeGet code
Reagent
VialsGet code
Shipping
VitroGet code