Skip to content

Button

Sends a configured payload when pressed. Buttons keep a natural height inside their grid cell; use xl for touch panels.

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.

Set confirm to a question and the button asks inline before sending, with no browser pop-ups.

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
{ "payload": "start", "topic": "cmd", "_client": { "id": "c3-lq0z1" } }
// before starting the job
return { ui: { loading: true, label: 'Running…' } };
// when it finishes
return { ui: { loading: false, label: 'Start cycle' } };