Number Input Widget
The Number Input widget provides a text field pre-validated for numeric input. Users type a value directly and press Send (or Enter). Useful when Slider precision isn't enough or when the range is very large (e.g. frequency in Hz, timestamps, large counts).
Default size: 2 × 2 grid cells
Configuration
| Property | Type | Default | Description |
|---|---|---|---|
min | number | 0 | Input minimum (rejects values below) |
max | number | 1000 | Input maximum (rejects values above) |
step | number | 1 | Increment used by ▲/▼ spin buttons |
placeholder | string | Enter value | Hint text when empty |
unit | string | `` | Unit suffix shown inside the field |
| Device | device | — | The device to write to |
| Pin | V0–V255 | — | The virtual pin to write |
| Label | string | — | Widget label |
Firmware example
VWIRE_RECEIVE(V0) {
long freq = param.asLong(); // e.g. 433920000
setRadioFrequency(freq);
Vwire.virtualSend(V0, freq); // echo confirmed value
}
Difference from Slider
| Feature | Slider | Number Input |
|---|---|---|
| Input method | Drag | Type / spin |
| Best for | Range ≤ 1000 | Large or non-linear ranges |
| Precision | Step-limited | Full numeric precision |
| Screen footprint | 3×1 (wide) | 2×2 (compact) |
Validation
Values outside [min, max] are highlighted in red and not sent until corrected.
Non-numeric input is silently rejected.