Skip to main content

Progress Bar Widget

👁 Display

The Progress Bar renders a horizontal or vertical fill bar based on a numeric value within a configured range. Use it for tank levels, download progress, task completion, or any bounded quantity.

Default size: 3 × 1 grid cells


Configuration

PropertyTypeDefaultDescription
minnumber0Value at 0% fill
maxnumber100Value at 100% fill
unitstring%Unit suffix shown
orientationhorizontal | verticalhorizontalBar direction
colorhex color#6366F1Fill color
showValuebooleantrueDisplay numeric value inside bar
DevicedeviceThe device to read from
PinV0V255The virtual pin to display
LabelstringWidget label

Firmware example

void loop() {
Vwire.run();

int waterLevel = analogRead(LEVEL_PIN) * 100 / 1023; // 0–100%
Vwire.virtualSend(V0, waterLevel);

delay(5000);
}

Threshold colors

The bar color is fixed but you can update it dynamically by using a second widget (or by following a convention where your firmware sends a normalized value):

Fill %Suggested color
0–25%#EF4444 red (critically low)
25–75%#F59E0B amber (normal)
75–100%#10B981 green (full)
Multi-zone indication

For threshold-based coloring, combine a Progress Bar (level) with an LED or Icon Status widget (state) rather than trying to encode color in the value.


Vertical orientation

Use a taller cell (1×3 or 2×4) with orientation: vertical for a liquid-level style display — great for water reservoirs, fuel tanks, or battery visualization.