Magnet Select, animated React component
A status picker where the selection is a liquid orb: a bead reaches toward the option you point at, and picking it sends the orb sliding over with a stretching liquid tail, nudging the options it passes out of the way.
- Pro
- Inputs & Controls
- Hover
- Spring
Play with it
Move the controls and watch it change. Copy code gives you a snippet with only the props you changed.
Available
Props
| Prop | Type | Default | What it does |
|---|---|---|---|
| options | MagnetOption[] | DEFAULT_MAGNET_OPTIONS | Each option has id, label and d (SVG path for a 24×24 stroked icon). The last one sits in the centre, the rest on a ring. |
| defaultValue | string | — | id of the option selected at first. Defaults to the last (centre) option. |
| onChange | (id: string) => void | — | Called with the option id when the user picks one. |
| label | string | "Status" | Accessible name of the radio group. |
| autoplay | boolean | false | Points at and picks options by itself until someone touches it. |