Option

Notify me by
No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/checkbox-option

About this component

Option tiles: two cards you can pick either or both of. A picked tile takes a tint and an outline of its own colour, its icon lights up and a round tick badge pops onto its corner.

Triggers

  • Click
  • State change
  • Spring
  • Icon

Techniques

  • CSS variables
  • SVG
  • CSS transition

Difficulty

Beginner

Accessibility

Keyboard and screen readers

A <fieldset> with a visually hidden <legend> ("Notify me by"); each tile is a <label> round a native checkbox, named by its visible text ("Email", "Text"). The icon and tick badge are aria-hidden, and :has(:focus-visible) outlines the tile.

Reduced motion

Every transition and animation is switched off, so it jumps straight to its final state.

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

More checkboxes

See all
PaneGet code
PapercutGet code
PatinaGet code
PopGet code