LED (lv_led)

A rectangle or circle whose brightness simulates a glowing indicator.

Overview

The LED is a rectangle or circle whose brightness can be adjusted to simulate a glowing indicator. A single color drives its background, border and shadow; lower brightness darkens it.

Learn more in the LVGL Open documentation.

lv_example_led.c

Properties

Parts

Style parts of the widget with local style (e.g. style_bg_color-knob="0xff0000") or with style sheets (e.g. <style name="style_knob" selector="knob">). See Styles to learn more.

PartDescription
mainStyle the LED: background, border, radius and shadow properties. bg_color, shadow and border colors are overridden by color, and brightness scales the overall look.

Properties below are the widget's XML <api>; see API for how properties, parameters and elements work.

PropertyTypeDescription
colorcolorSet the color of the LED
brightnessopaSet how dark or bright the LED should be

Last updated on

On this page