Skip to content
On this page

Switch

A switch is a commonly used user interface element that represents a binary state, such as on/off or yes/no. Users can change its state by clicking or sliding the switch.

For more detailed information, you can refer to this link: https://docs.lvgl.io/8.3/widgets/core/switch.html

Styles

The appearance of the switch can be defined using styles.

  • MAIN: The main part, including the background of the switch.
  • INDICATOR: The switch part representing the current state of the switch.
  • KNOB: The draggable button that users can drag to change the state of the switch.

Example

switch_1.png