Slint — declarative GUI toolkit


# Slint [![Component Registry](]( Slint is a declarative GUI toolkit to build native user interfaces for desktop and embedded applications written in Rust, C++, or JavaScript. This component provides the C++ version of [Slint]( for the [Espressif IoT Development Framework]( It has been tested on ESP32-S3 devices. ![Screenshot]( ## Usage By using this component, the `Slint::Slint` CMake target is linked to your application and you can access the entire functionality of the [Slint C++ API]( In addition, this component provides the `slint_esp.h` header file, which provides a `EspPlatform` class, based on [ESP LCD Touch]( It implements the `slint::platform::Platform` interface by reading touch events and rendering to an attached screen via `esp_lcd_panel_draw_bitmap`. Use this platform implementation by instantiating it with a `esp_lcd_panel_handle_t`, an optional `esp_lcd_touch_handle_t`, and a pointer to one or two `slint::platform::Rgb565Pixel` frame buffers. Next, register the instance with the Slint run-time library by calling `slint::platform::set_platform()`: ```cpp static std::vector<slint::platform::Rgb565Pixel> single_buffer(BSP_LCD_H_RES * BSP_LCD_V_RES); slint::platform::set_platform( std::make_unique<EspPlatform>(slint::PhysicalSize({ BSP_LCD_H_RES, BSP_LCD_V_RES }), panel_handle, touch_handle, single_buffer)); ``` Alternatively, you can implement your own sub-class of `slint::platform::Platform` to drive the screen and handle input events. Next, integrate your `.slint` files into the build by compiling them to C++ and linking them to your component: ```cmake slint_target_sources(${COMPONENT_LIB} my_application_ui.slint) ``` Instantiate the Slint component by including the generated header file (`my_application_ui.h` in the above example), call `create()` on the generated class and `run()` to spin the event loop: ```cpp #include "my_application_ui.h" /// ... auto my_application_ui = MainWindow::create(); my_application_ui->run(); ``` ## License You can use Slint under ***any*** of the following licenses, at your choice: 1. [GNU GPLv3](, 2. [Paid license]( See also the [Licensing FAQ]( Slint is also available with a third license (Royalty Free) for desktop applications. ## Links [Website]( · [GitHub]( · [Docs](

Supports all targets

License: Custom

To add this component to your project, run: add-dependency "slint/slint^1.2.0-alpha3"

or download archive


  • espressif/esp_lcd_touch >=1.0.4
  • ESP-IDF >=5.1
  • Stats

    • Downloaded in total
      Downloaded in total 20 times
    • Downloaded this version
      This version: 2 times


    slint/slint version: 1.2.0-alpha3 |