Button
Sends a configured payload when pressed. Buttons keep a natural height inside their grid cell; use xl for touch panels.
Variants and colors
Section titled “Variants and colors”Four styles (variant) × five colors (color). Every combination works in dark and light themes.
| Size | Height | Use |
|---|---|---|
sm |
32 px | dense toolbars |
md |
40 px | default |
lg |
48 px | primary actions |
xl |
56 px | touch panels, gloves |
Any of the ~2,400 Lucide icons by name: play, power, rotate-ccw, thermometer… Put one before or after the label, or leave the label empty for an icon-only button. Icons load on demand, so they add nothing to the bundle.
Confirmation
Section titled “Confirmation”Set confirm to a question and the button asks inline before sending, with no browser pop-ups.
Properties
Section titled “Properties”| Property | Type | Default | Description |
|---|---|---|---|
label |
string | Button |
Text. Empty + an icon = icon-only button |
variant |
solid | soft | outline | ghost |
solid |
Visual style |
color |
accent | neutral | success | warning | danger |
accent |
Color |
size |
sm | md | lg | xl |
md |
Height and text size |
icon |
string | Lucide icon before the label | |
iconRight |
string | Lucide icon after the label | |
fullWidth |
boolean | true |
Fill the cell width |
payload |
any | clicked |
Payload sent on press (string, number, boolean, JSON, timestamp) |
topic |
string | msg.topic of the output |
|
confirm |
string | Ask this question before sending | |
loading |
boolean | false |
Spinner, ignores presses. Set via msg.ui |
disabled |
boolean | false |
Set via msg.ui |
Output
Section titled “Output”{ "payload": "start", "topic": "cmd", "_client": { "id": "c3-lq0z1" } }Example: show progress while a job runs
Section titled “Example: show progress while a job runs”// before starting the jobreturn { ui: { loading: true, label: 'Running…' } };// when it finishesreturn { ui: { loading: false, label: 'Start cycle' } };