Skip to content
Design System
GitHub

Emergency stop

v0.17.3Beta

One touch stops; hold 2 s to stop all; lying down it becomes wake and stand up. UI only: sending and the Bluetooth fallback live in the app.

Ready

Install
npx shadcn add @syncrobotic/stop-button

Also installs: lucide-react, @syncrobotic/cn, @syncrobotic/use-long-press, @syncrobotic/feedback

Overview

The emergency stop: one touch stops, holding 2 s stops all; lying down it becomes wake and stand up.

When to use

  • Every screen that controls a robot, always in the same place.

Use something else

  • Any other destructive action: Button with the destructive variant. Solid red belongs to the stop alone.

More examples

States and real uses. Each example is also a Storybook story and a visual regression test.

Standing still
One robot only

Stop states

Sending
Unconfirmed
Bluetooth only
Delivered over Bluetooth
No connection

Connection states

Wake while lying down
Battery too low to wake

Wake states

Usage rules

  • UI only: it takes state and calls onStop, onStopAll or onWake. Sending the command, waiting for the dog and falling back to Bluetooth after 1.5 s belong to the app, which passes the result back as state.
  • Solid red is reserved for the emergency stop. Other destructive actions use the danger outline and text.
  • Its height is --h-stop: 56 px, 64 px in glove density, and it never shrinks (compact leaves it alone). Only the stop, wake and slide to release use it.
  • It buzzes at the touch and for the answer it is shown (unconfirmed, delivered over Bluetooth). When the app swaps it for SlideToRelease on confirmation, the app calls feedback("stopConfirmed") at that moment.
  • Works the same for every input: touch or click stops; Enter or Space stops; holding any of them for 2 s stops all; a screen-reader or switch-control activation stops.
  • Every string can be replaced through labels (WakeButton: label and reason) to localise.

Changelog

  • 0.17.32026-11-19WakeButton's disabled reason is 14 px (it was 12 px and dim).
  • 0.11.12026-11-18“No connection” and WakeButton's disabled reason are readable (muted text on muted, not white on grey or the disabled colour, which measured 2.1–2.6:1).
  • 0.11.02026-11-18Buzzes: one pulse at the touch, two when the robot confirms, two long ones when it does not (the feedback patterns).

How to upgrade