Skip to content

Input

A field to type a value. Number mode has −/+ buttons, arrow keys, a unit, limits and accepts a decimal comma; text mode can require a format; password mode hides what is typed. Values are checked as you type and again on the server: an invalid value shows an inline error and is never sent.

Type a value and press Enter, or use −/+. Try 95 or 21,5.

Property Type Default Description
label string Input Title above the field
icon string Lucide icon before the label
mode text · number · password text Kind of value
placeholder string Hint shown when empty
unit string Number mode: unit inside the field
min, max number Number mode: limits (empty = none)
step number 1 Number mode: −/+ and arrow-key increment
required boolean false Empty values are an error
pattern string Text and password: a regular expression the whole value must match
patternMessage string Invalid format Error shown when the pattern doesn’t match
sendOn enter · change enter Send on Enter or leaving the field, or while typing (after a 0.5 s pause)
disabled boolean false Set with msg.ui to lock the field

Press Escape to discard what you typed and go back to the current value.

msg.payload = 65; // set the value shown (no output unless "Pass input messages through")
msg.ui = { max: 80 }; // change limits or any other property
msg.ui = { disabled: true };
{ payload: 21.5, topic: 'setpoint', _client: { id: 'c7f…' } } // number mode: a number (null when cleared)
{ payload: 'AB-1234', topic: 'batch', _client: { id: 'c7f…' } } // text and password: a string