How to convert a beautiful html / CSS switch code in lvgl code

What do you want to achieve?

Create a beautiful switch in lvgl.

What have you tried so far?

Gemini ai conversion code.

Code to reproduce

beautiful_button.zip (1.3 KB)

Screenshot

off

on

Environment

  • MCU/MPU/Board:
    ESP32-S3
  • LVGL version: See lv_version.h
    9.3.0

Would I be able to convert using lvgl pro ?

I’ve never used lvgl pro.