Early accessFull site coming soon. Pro is $49.99 a year. See pricing ›

Nexus UI

Capsule Toggles, animated React component

Switches built as a ball sealed in a glass capsule. Flip one and the ball stretches into a pill mid-flight, then takes on the row's colour and glows as it lands.

  • Pro
  • Inputs & Controls
  • Spring

Play with it

Move the controls and watch it change. Copy code gives you a snippet with only the props you changed.

Controls

  • Wi-FiHome network
  • BluetoothOff
  • FocusUntil 6 PM
  • Low PowerOff

Props

PropTypeDefaultWhat it does
rowsWi-Fi, Bluetooth, Focus, Low PowerCapsuleToggles: rows as { id, label, hint, color, on }.
title"Controls"CapsuleToggles: small heading above the list.
autoplayfalseCapsuleToggles: flips the rows one after another until someone touches the panel.
checkedrequiredCapsuleToggle: whether the switch is on.
onChangerequiredCapsuleToggle: called with the new value when pressed.
labelrequiredCapsuleToggle: accessible name of the switch.
onColor"#34c759"CapsuleToggle: ball colour and glow when on.
offColortheme greyCapsuleToggle: ball colour when off; defaults to a grey that adapts to dark mode.