← All scene elements
SCENE ELEMENT / 06

Progress bar

Horizontal progress driven by numbers or JSON.

LIVE WEB PLAYER

See it respond.

The same raylib runtime, compiled to WebAssembly. Load this example, inject MQTT messages and watch its published events.

Loading WebAssembly…
MQTT I/O
Waiting for runtime…

The browser requires a user action before the scene is loaded. Click Load demo scene first. MQTT is emulated and never leaves this page. Shaders are disabled in the web build; GPIO is hardware-only.

Horizontal progress indicator. Values may use 0..1 or percentages 0..100.

Configuration

FieldDescription
typeprogressbar
valueInitial value
progress_fieldJSON property used for incoming objects
colorFilled colour
bg_colorTrack colour
frame_color, frame_thicknessOptional inherited border

Copy-and-paste JSON

json
{
  "type": "progressbar",
  "id": "game_progress",
  "pos": [100, 1000],
  "size": [1720, 16],
  "value": 25,
  "progress_field": "percent",
  "color": "#3DDC97FF",
  "bg_color": "#1A1A1AFF",
  "frame_color": "#000000FF",
  "frame_thickness": 1,
  "layer": 2
}

MQTT

text
ergs/rpi01/update/game_progress          67
ergs/rpi01/update/game_progress          {"percent":67}
ergs/rpi01/cmd/game_progress/color       #58A6FF