Skip to content
On this page

Buttons

Buttons are commonly used user interface elements that trigger actions or perform specific functions. LVGL provides different types of buttons, including regular buttons and image buttons.

Introduction to regular buttons: https://docs.lvgl.io/8.3/widgets/core/btn.html

Introduction to image buttons: https://docs.lvgl.io/8.3/widgets/extra/imgbtn.html

Properties

Image buttons have different properties to represent different states of the button. You can choose appropriate properties to define the appearance and behavior of your image buttons as needed. Here are some common properties of image buttons:

Image Button Properties
Released stateLV_IMGBTN_STATE_RELEASED
Pressed stateLV_IMGBTN_STATE_PRESSED
Checked released stateLV_IMGBTN_STATE_CHECKED_RELEASED
Checked pressed stateLV_IMGBTN_STATE_CHECKED_PRESSED

Example