Button (lv_button)

A clickable Base Widget with defaults tuned for its role.

Overview

A Button is a clickable Base Widget with defaults tuned for its role: it is not scrollable, is added to the default input group, and sizes itself to its content. Place a Label or image inside it for the caption.

Learn more in the LVGL Open documentation.

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 whole button: background, border, outline, shadow and padding. Combine with state selectors (pressed, checked, disabled, focused) for feedback.

This widget adds no XML properties of its own — it inherits the full API of the Base Widget (lv_obj). See API for how the <api> works.

Last updated on

On this page