EmergencyStop¶
Red mushroom emergency stop button (BOOL-012); a drawing, not an emergency stop device.
Not an emergency stop device
This widget draws an emergency stop button on a screen; it is not an emergency stop device. A real emergency stop is a hardwired device that stops the machine through a safety-rated circuit, independently of any software. Use the widget to represent or simulate an emergency stop, never as the means of stopping a machine. See the safety notice.

Controls, discrete · Widget catalog · API reference ·
schema emergencystop.schema.json
Example¶
The traits of the picture above:
ai.EmergencyStop(label="E-Stop")
Traits¶
| Trait | Type | Default | Set by | Description |
|---|---|---|---|---|
size |
array | [110,110] |
host | [width, height] in CSS pixels. |
mechanical_action |
"switch_when_pressed" |
"switch_when_pressed" |
host | Only switch_when_pressed: a press latches the stop. |
value |
boolean | false |
host, widget | True once pressed. The front end only ever writes true; only the host resets it to false (Python: reset()). A Python kernel refuses false from any other source. |
Common traits (11), shared with other widgets
| Trait | Type | Default | Set by | Description |
|---|---|---|---|---|
mode |
"control", "indicator" |
"control" |
host | "control": the user sets the value; "indicator": display only. |
label |
string | "" |
host | Plain text, never interpreted as HTML (SEC-002). |
disabled |
boolean | false |
host | Greyed out, input rejected. |
visible |
boolean | true |
host | |
tooltip |
string | "" |
host | Plain text shown on hover. |
style |
"modern", "classic", "system" |
"modern" |
host | |
theme |
"auto", "light", "dark", "system" |
"auto" |
host | "auto": the style decides; "system": the host page or the operating system (STYLE-007). |
skin |
object | {} |
host | Replaceable drawing parts: part name -> SVG source, sanitized (STYLE-005, STYLE-006). |
default_state |
boolean | false |
host | State a latch returns to once the host has read it (BOOL-008). |
latch_timeout |
number | 0 |
host | Seconds after which an unread latch expires (host side); 0: never. |
confirm |
boolean | false |
host | Ask for a confirmation before changing the value (BOOL-011). |
Set by: host, the program (Python, Julia, ...); widget, the user through the widget;
derived, computed from other traits by the host that owns the state, or by the widget.
See the trait contract.