# LED (/examples/widgets/led)



A rendered indicator drawn as a glowing rectangle, controlled via `lv_led_on`, `lv_led_off`, and `lv_led_set_brightness`. Not tied to hardware.

LED brightness [#led-brightness]

<LvglExampleBrief>
  Same hue, three different brightness values.
</LvglExampleBrief>

The brightness attribute scales how lit each LED appears, in the 0..255 range. With
lower brightness the color darkens; with 255 it reaches the configured peak. The
three LEDs share one color so the effect of brightness alone is visible.

<LvglExample name="lv_example_led_brightness" path="widgets/led/lv_example_led_brightness" />

LED color [#led-color]

<LvglExampleBrief>
  Three LEDs lit in different hues via the color attribute.
</LvglExampleBrief>

The color attribute sets the LED's background, border, and shadow color together, so
a single value drives the whole lit-bulb look. Brightness stays at the default here
to isolate the effect of changing the color alone.

<LvglExample name="lv_example_led_color" path="widgets/led/lv_example_led_color" />

LED styling [#led-styling]

<LvglExampleBrief>
  Push the LED past its color attribute with border, outline, shadow, and shape.
</LvglExampleBrief>

The color attribute drives the base lit look, but the LED is still a base widget so
the border / outline / shadow / radius stack all apply. The first LED keeps the round
default with a ring outline + glow; the second uses a small radius to render as a
square indicator with a hard border instead.

<LvglExample name="lv_example_led_styling" path="widgets/led/lv_example_led_styling" />
