dd5b0bf46d
Arduino Lint / lint (push) Canceled after 0s
Build Examples with C++ Compiler / build-examples (push) Canceled after 0s
MicroPython CI / Build esp32 port (push) Canceled after 0s
MicroPython CI / Build rp2 port (push) Canceled after 0s
MicroPython CI / Build stm32 port (push) Canceled after 0s
MicroPython CI / Build unix port (push) Canceled after 0s
C/C++ CI / Build OPTIONS_16BIT - Ubuntu (push) Canceled after 0s
C/C++ CI / Build OPTIONS_24BIT - Ubuntu (push) Canceled after 0s
C/C++ CI / Build OPTIONS_FULL_32BIT - Ubuntu (push) Canceled after 0s
C/C++ CI / Build OPTIONS_NORMAL_8BIT - Ubuntu (push) Canceled after 0s
C/C++ CI / Build OPTIONS_SDL - Ubuntu (push) Canceled after 0s
C/C++ CI / Build OPTIONS_16BIT - cl - Windows (push) Canceled after 0s
C/C++ CI / Build OPTIONS_16BIT - gcc - Windows (push) Canceled after 0s
C/C++ CI / Build OPTIONS_24BIT - cl - Windows (push) Canceled after 0s
C/C++ CI / Build OPTIONS_24BIT - gcc - Windows (push) Canceled after 0s
C/C++ CI / Build OPTIONS_FULL_32BIT - cl - Windows (push) Canceled after 0s
C/C++ CI / Build OPTIONS_FULL_32BIT - gcc - Windows (push) Canceled after 0s
C/C++ CI / Build ESP IDF ESP32S3 (push) Canceled after 0s
C/C++ CI / Run tests with 32bit build (push) Canceled after 0s
C/C++ CI / Run tests with 64bit build (push) Canceled after 0s
BOM Check / bom-check (push) Canceled after 0s
Verify GDB constants are up-to-date / verify-gdb-consts (push) Canceled after 0s
Verify the widget property name / verify-property-name (push) Canceled after 0s
Verify code formatting / verify-formatting (push) Canceled after 0s
Compare file templates with file names / template-check (push) Canceled after 0s
Code Generation / Code Generation (push) Canceled after 0s
Build Docs / build-and-deploy (push) Canceled after 0s
Build .deb packages / build (push) Canceled after 0s
Validate pkg-config and CMake config / cmake (linux) (push) Canceled after 0s
Validate pkg-config and CMake config / pkgconfig (linux) (push) Canceled after 0s
Validate pkg-config and CMake config / cmake (linux-3d) (push) Canceled after 0s
Validate pkg-config and CMake config / pkgconfig (linux-3d) (push) Canceled after 0s
Test API JSON generator / Test API JSON (push) Canceled after 0s
Install LVGL using CMake / build-examples (private) (push) Canceled after 0s
Install LVGL using CMake / build-examples (public) (push) Canceled after 0s
Check Makefile / Build using Makefile (push) Canceled after 0s
Check Makefile for UEFI / Build using Makefile for UEFI (push) Canceled after 0s
Emulated Performance Test / ARM Emulated Benchmark - Script Check (scripts/perf/tests/benchmark_results_comment/test.sh) (push) Canceled after 0s
Emulated Performance Test / ARM Emulated Benchmark - Script Check (scripts/perf/tests/filter_docker_logs/test.sh) (push) Canceled after 0s
Emulated Performance Test / ARM Emulated Benchmark - Script Check (scripts/perf/tests/serialize_results/test.sh) (push) Canceled after 0s
Emulated Performance Test / ARM Emulated Benchmark 32b - lv_conf_perf32b (push) Canceled after 0s
Emulated Performance Test / ARM Emulated Benchmark 64b - lv_conf_perf64b (push) Canceled after 0s
Emulated Performance Test / ARM Emulated Benchmark - Save PR Number (push) Canceled after 0s
Performance Tests CI / Perf Tests OPTIONS_TEST_PERF_32B - Ubuntu (push) Canceled after 0s
Performance Tests CI / Perf Tests OPTIONS_TEST_PERF_64B - Ubuntu (push) Canceled after 0s
Port repo release update / run-release-branch-updater (push) Canceled after 0s
Static Checks / Static Checks (push) Canceled after 0s
Verify Font License / verify-font-license (push) Canceled after 0s
Verify Kconfig / verify-kconfig (push) Canceled after 0s
Hardware Performance Test / Hardware Performance Benchmark (push) Canceled after 0s
Hardware Performance Test / HW Benchmark - Save PR Number (push) Canceled after 0s
arch(win): deprecate and add a flex-column window example
Deprecate the lv_win widget. A window is just a flex column with a header bar and
a content area, so it can be built directly from lv_obj.

Following the deprecation guidelines:
- @deprecated Doxygen tags and LV_DEPRECATED on lv_win_create
- LV_LOG_DEPRECATED runtime warning in lv_win_create
- migration-v10.mdx entry pointing to the replacement
- the new lv_example_flex_win shows how to build one from base widgets

Live call sites in the kept examples, demos and tests are wrapped with
LV_DEPRECATIONS_IGNORE_BEGIN/END so the -Wdeprecated -Werror build stays clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-03 10:30:58 +02:00

DocsForumBlogServices spacer EN中文日本語한국어PTעברית

Light and Versatile Graphics Library



Ebike demo with vector graphics   ECG demo with animated 3D model



OverviewFeaturesLVGL ProExamplesIntegrationContributingLicense

Overview

LVGL is a free and open-source UI library that enables you to create graphical user interfaces for any MCUs and MPUs from any vendor on any platform.

Requirements: LVGL has no external dependencies, which makes it easy to compile for any modern target, from small MCUs to multi-core Linux-based MPUs with 3D support. For a typical UI, you need only ~100kB RAM, ~200300kB flash, and a buffer size of 1/10 of the screen for rendering.

Wide adoption: Chip vendors (like NXP, Espressif, Renesas, and so on), RTOS projects (Zephyr, NuttX, etc.), and board manufacturers (Riverdi, Seeed Studio, VIEWE, Elecrow, etc.) have all integrated LVGL already. If a development board has a display, it's very likely the vendor offers LVGL support too.

Professional tools: Instead of writing C code, you can hugely speed up and simplify UI development by using LVGL Pro, a complete toolkit with Editor, Figma integration, Online Viewer, and CLI. It exports pure LVGL C code from XML, with no extra runtime or hidden magic. It's free for non-commercial use and evaluation.

To get started, browse the Examples, spin up a Simulator project, explore the Online Viewer of LVGL Pro, compile and run a UI in a window in LVGL Pro with one click, or dive into our AI-ready Docs. Just click Ask AI and ask anything!

Features

Free, Portable, and Scalable

  • A fully portable C (C++ compatible) library with no external dependencies.
  • Can be compiled for any MCU or MPU, with any (RT)OS. Make, CMake, and simple globbing are all supported.
  • Supports monochrome, ePaper, OLED, or TFT displays, or even monitors. Displays
  • Distributed under the MIT license, so you can easily use it in commercial projects too.
  • At a bare minimum needs only 32kB RAM and 128kB Flash, a frame buffer, and at least a 1/10 screen-sized buffer for rendering.
  • OS, external memory, and GPU are supported but not required.

Widgets, Styles, Layouts, and More

  • 30+ built-in Widgets: Button, Label, Slider, Chart, Keyboard, Meter, Arc, Table, and many more.
  • Flexible Style system with 100+ style properties to customize any part of the widgets in any state.
  • Flexbox and Grid-like layout engines to automatically size and position the widgets responsively.
  • Data bindings to easily connect the UI with the application.
  • Supports Mouse, Touchpad, Keypad, Keyboard, External buttons, Encoder Input devices.
  • Multiple display support.

Rendering

  • Built-in 2D rendering engine supporting basic shapes, gradients, anti-aliasing, opacity, smooth scrolling, box and drop shadows, image transformation, etc.
  • Powerful 3D rendering engine to show glTF models with OpenGL.
  • Vector graphics, SVG, and Lottie support.
  • Text is rendered with UTF-8 encoding, supporting CJK, Thai, Hindi, Arabic, and Persian writing systems.
  • Built-in support for GPUs like VG-Lite, Dave2D, NeoChrome, OpenGL, etc.

LVGL Pro

Building UIs in C works well, but it gets slow to iterate on and harder to keep consistent as a project grows. LVGL Pro lets you build reusable components and screens visually, preview changes instantly, and manage data bindings, translations, animations, and tests in one place.

Pro exports plain LVGL C code: the same LVGL you already use, with no extra runtime or dependency. It drops into an existing project without changing how you build or ship.

Building a UI in the LVGL Pro editor with live preview

You can try it in the browser at viewer.lvgl.io without installing anything, or download the Editor and use it under the free Community license.

LVGL Pro consists of four tightly related tools:

  1. Editor: The heart of LVGL Pro. A desktop app to build components and screens in XML, manage data bindings, translations, animations, tests, and more. Learn more about the XML Format and the Widgets.
  2. Online Viewer: Run the Editor in your browser, open GitHub projects, and share easily without setting up a developer environment. Visit https://viewer.lvgl.io.
  3. Figma Plugin: Move a Figma design to LVGL Pro with one click. See how it works here.
  4. CLI Tool: Generate C code and run tests in CI/CD. See the details here.

The Community and Evaluation tiers are free to use; see licensing for commercial use.

Examples

You can check out more than 100 C and XML examples at https://lvgl.io/docs/open/examples

The Online Viewer of LVGL Pro also contains many tutorials and the same examples that you can play with interactively.

As a teaser, here is the same simple UI written in C and in XML:

A centered button that prints when clicked

static void button_clicked_cb(lv_event_t * e)
{
    printf("Clicked\n");
}

/* ... */

lv_obj_t * button = lv_button_create(lv_screen_active());
lv_obj_center(button);
lv_obj_add_event_cb(button, button_clicked_cb,
                    LV_EVENT_CLICKED, NULL);

lv_obj_t * label = lv_label_create(button);
lv_label_set_text(label, "Hello from LVGL!");
<screen>
  <view>
    <lv_button align="center">
      <event_cb callback="button_clicked_cb" />
      <lv_label text="Hello from LVGL!" />
    </lv_button>
  </view>
</screen>

The XML above is what LVGL Pro works with: you build the screen visually and it generates the C for you.

Integration

LVGL has no external dependencies, so it can be easily compiled for any device. It comes with built-in drivers, is available in many package managers and RTOSes, and is also easy to port to any new device.

Pre-integrated

Built-in drivers

LVGL ships with ready-to-use drivers, so on common platforms you don't have to write display and input handling yourself:

  • Simulator / desktop: SDL, X11, and Wayland windows to develop and preview your UI on a PC.
  • Display controllers: Generic MIPI-DBI/SPI LCDs (ILI9341, ST7789, and similar), plus vendor controllers like ST's LTDC and NXP's eLCDIF.
  • Embedded Linux: framebuffer (fbdev), DRM/KMS, Wayland, and libinput/evdev for touch and pointer input. Learn more here.
  • GPU / accelerators: VG-Lite, NXP PXP, ThinkSilicon NemaGFX, Arm-2D and OpenGL ES

See the full list and setup guides in the Integration docs.

In LVGL Pro

In LVGL Pro you can create ready-to-use UI-only, VSCode, Zephyr, and Linux projects with a single click. image

Porting manually

Integrating LVGL is very simple. Just drop it into any project and compile it as you would compile other files. To configure LVGL, copy lv_conf_template.h as lv_conf.h, enable the first #if 0, and adjust the configs as needed. (The default config is usually fine.) If available, LVGL can also be used with Kconfig.

Once in the project, you can initialize LVGL and create display and input devices as follows:

#include "lvgl/lvgl.h" /*Define LV_LVGL_H_INCLUDE_SIMPLE to include as "lvgl.h"*/

#define TFT_HOR_RES 320
#define TFT_VER_RES 240

static uint32_t my_tick_cb(void)
{
    return my_get_millisec();
}

static void my_flush_cb(lv_display_t * disp, const lv_area_t * area, uint8_t * px_map)
{
    /*Write px_map to the area->x1, area->x2, area->y1, area->y2 area of the
     *frame buffer or external display controller. */

    /* signal LVGL that we're done */
    lv_display_flush_ready(disp);
}

static void my_touch_read_cb(lv_indev_t * indev, lv_indev_data_t * data)
{
   if(my_touch_is_pressed()) {
       data->point.x = touchpad_x;
       data->point.y = touchpad_y;
       data->state = LV_INDEV_STATE_PRESSED;
   } else {
       data->state = LV_INDEV_STATE_RELEASED;
   }
}

void main(void)
{
    my_hardware_init();

    /*Initialize LVGL*/
    lv_init();

    /*Set millisecond-based tick source for LVGL so that it can track time.*/
    lv_tick_set_cb(my_tick_cb);

    /*Create a display where screens and widgets can be added*/
    lv_display_t * display = lv_display_create(TFT_HOR_RES, TFT_VER_RES);

    /*Add rendering buffers to the screen.
     *Here adding a smaller partial buffer assuming 16-bit (RGB565 color format)*/
    static uint8_t buf[TFT_HOR_RES * TFT_VER_RES / 10 * 2]; /* x2 because of 16-bit color depth */
    lv_display_set_buffers(display, buf, NULL, sizeof(buf), LV_DISPLAY_RENDER_MODE_PARTIAL);

    /*Add a callback that can flush the content from `buf` when it has been rendered*/
    lv_display_set_flush_cb(display, my_flush_cb);

    /*Create an input device for touch handling*/
    lv_indev_t * indev = lv_indev_create();
    lv_indev_set_type(indev, LV_INDEV_TYPE_POINTER);
    lv_indev_set_read_cb(indev, my_touch_read_cb);

    /*The drivers are in place; now we can create the UI*/
    lv_obj_t * label = lv_label_create(lv_screen_active());
    lv_label_set_text(label, "Hello world");
    lv_obj_center(label);

    /*Execute the LVGL-related tasks in a loop*/
    while(1) {
        lv_timer_handler();
        my_sleep_ms(5);         /*Wait a little to let the system breathe*/
    }
}

Contributing

LVGL is an open project, and contributions are very welcome. There are many ways to contribute, from simply speaking about your project, writing examples, improving the documentation, fixing bugs, or even hosting your own project under the LVGL organization.

For a detailed description of contribution opportunities, visit the Contributing section of the documentation.

Hundreds of people have already left their fingerprint on LVGL. Be one of them! See you here! 🙂

License

The LVGL library is distributed under the MIT license, so you can use it freely in both open-source and commercial products with no royalties. See LICENCE.txt.

All third-party libraries bundled with LVGL are released under MIT-compatible licenses too, so you can use LVGL and its dependencies with confidence.

LVGL Pro has separate licensing:

  • The Community and Evaluation tiers are free for non-commercial use, perfect for learning, hobby projects, and evaluating the tools.
  • Commercial use of LVGL Pro requires a paid license. See the Pricing and Details.
S
Description
Embedded graphics library to create beautiful UIs for any MCU, MPU and display type.
Readme
998 MiB
Languages
C 89.7%
C++ 6.7%
Python 2.7%
HTML 0.4%
CMake 0.3%