Bencho Originals

Features

  • Seven chips on a 45px honeycomb. The chosen chip swells to 1.28×.
  • Every other chip is pushed straight away from the chosen one, and shrinks and leans more the closer it sits.
  • Each chip has its own iridescent fill made only from layered CSS gradients, with no images.
  • Press feedback: the chosen chip squeezes and the others dip under your finger.
  • Two sizes: large (44px chips) and small (34px).

API reference

<MagneticSelect /> from components/bencho/magnetic-select.tsx

PropTypeDefaultDescription
optionsstring[]7 colour namesAccessible names for the seven chips, in honeycomb order (centre first).
defaultValuenumber0Index of the chip selected on mount.
onChange(index: number) => void—Called when the selection changes.
pullnumber (0–100)55How far the other chips get shoved. 55 gives about 14px.
bouncenumber (0–100)55Spring bounce. 0 is critically damped, 100 is springy.
size"small" | "large""large"Chip diameter: 34px or 44px.

Keyboard interactions

TabFocuses the selected chip. The group is one tab stop.
← ↑ / → ↓Selects the previous or next chip, wrapping around.
Home / EndSelects the first or last chip.

Accessibility

  • Built as a radio group: role="radiogroup" with seven role="radio" buttons and aria-checked.
  • Roving tabindex: only the selected chip is tabbable, and focus follows the selection.
  • Each chip is labelled by its entry in options. The colours are decoration and carry no meaning.
  • There's a visible focus ring on keyboard focus.

Sound & haptics

Silent by design: no audio and no vibration. All of the feedback is visual, so it works anywhere, muted or not.

Files

Written from scratch for sher.md and inspired by bencho.dev. It contains none of bencho's code or assets.