LVGL

v9.5.0
LVGL is a lightweight, open-source C graphics library designed to build professional user interfaces on any microcontroller or microprocessor. It features a hardware-independent architecture with low memory requirements, supporting advanced rendering features like anti-aliasing, animations, and complex layout engines.

Features

  • Hardware-independent C library with no external dependencies for maximum portability.

  • Low resource footprint requiring as little as 32kB RAM and 128kB Flash.

  • Support for monochrome, ePaper, OLED, and TFT displays of any resolution.

  • Over 30 built-in widgets including buttons, charts, keyboards, and sliders.

  • Advanced styling system with approximately 100 customizable properties for states and parts.

  • Responsive layout engines based on CSS Flexbox and Grid standards.

  • Full UTF-8 support for internationalization, including CJK, Arabic, and Persian scripts.

  • Integrated data binding system (Observer pattern) to sync UI with application logic.

  • Advanced rendering capabilities including anti-aliasing, opacity, shadows, and image transformations.

  • Support for 3D rendering of glTF models via OpenGL integration.

  • Multi-display support for managing several screens simultaneously.

  • Compatibility with various input devices like touchpads, mice, encoders, and keyboards.

  • Built-in animation engine for smooth transitions and UI effects.

  • XML-based UI definition support via the LVGL Pro toolkit.

  • Integration with major RTOS environments like Zephyr, NuttX, and RT-Thread.

Architecture

LVGL follows a modular, object-oriented architecture implemented in C. The core of the library is built around the “Object” (lv_obj) abstraction, where every UI element is a widget inheriting base properties. The architecture is decoupled from hardware through a callback-based driver layer. Developers provide “flush” callbacks for display rendering and “read” callbacks for input devices, allowing LVGL to run on any display controller or input hardware without modification to the core library.

The rendering pipeline uses a partial buffering strategy to minimize RAM usage, where only changed areas of the screen are recalculated and drawn into a small draw buffer before being sent to the display. This allows for high-quality graphics even on memory-constrained MCUs. The library also includes a powerful style system that separates visual appearance from logic, and layout engines (Flexbox and Grid) that handle responsive positioning automatically.

Core Components

  • Display Interface: Manages rendering buffers and coordinates with hardware-specific flush callbacks.
  • Input Device Interface: Handles touch, mouse, keypad, and encoder inputs through a standardized event system.
  • Widget Engine: A collection of 30+ UI components with hierarchical parent-child relationships.
  • Style System: A CSS-like property system for customizing widget appearance across different states.
  • Layout Engines: Flexbox and Grid implementations for responsive design and automatic positioning.
  • Animation & Timer Engine: Manages time-based events, visual transitions, and internal task scheduling.

Use Cases

This library is ideal for:

  • Industrial HMI: Creating robust control panels for factory machinery with charts and complex data visualization.
  • Consumer Electronics: Building sleek interfaces for smart home appliances, thermostats, and wearable devices.
  • Medical Devices: Developing high-reliability UIs for patient monitors and diagnostic equipment requiring clear, anti-aliased graphics.
  • Automotive Dashboards: Implementing digital clusters and infotainment systems with smooth animations and multi-display support.
  • IoT Gateways: Adding local configuration screens to headless devices using low-cost monochrome or OLED displays.
  • Cross-platform Prototyping: Developing UI logic on a PC simulator (Windows/Linux/macOS) and deploying the same code to embedded hardware.

Getting Started

To integrate LVGL, developers typically add the source files to their project and provide a configuration file named lv_conf.h. The initialization process involves calling lv_init(), setting up a tick source via lv_tick_set_cb(), and registering display and input drivers. A display is created using lv_display_create(), where buffers and a flush callback are assigned. The main application loop must periodically call lv_timer_handler() to process UI tasks and animations. Detailed documentation, including over 100 examples and API references, is available at docs.lvgl.io.

Related Projects (200)

View All 200 Projects →
Clawdmeter

Clawdmeter

Clawdmeter is an ESP32-S3-powered desk dashboard that monitors Claude Code token usage and displays it on a 2.16" AMOLED screen. It uses the LVGL library for its high-resolution UI and the NimBLE stack to communicate with a host daemon via BLE, while also functioning as a HID keyboard for shortcuts. The project features dynamic pixel-art animations that react to real-time API utilization rates.

freertos lvglnimbleplatformio-platformio-core
IkeDryBox - Smart 3D Filament Dryer

IkeDryBox - Smart 3D Filament Dryer

IkeDryBox is an advanced ESP32-based DIY filament dryer featuring precision PID temperature control and a responsive LVGL touch interface. It integrates seamlessly with Home Assistant via MQTT and provides a built-in WebUI for real-time parameter tuning and network configuration.

lvgl
M5Dial-LVGL

M5Dial-LVGL

An LVGL port for the M5Stack Dial (M5Dial) based on the ESP-IDF framework. It integrates the Light and Versatile Graphics Library with M5Unified to provide support for the device's circular touch display and rotary encoder.

freertos lvgl
ESP32-8048S050C with LVGL 9.4 and FreeRTOS

ESP32-8048S050C with LVGL 9.4 and FreeRTOS

An implementation for the Sunton ESP32-S3 800x480 capacitive touch display utilizing ESP-IDF 5.5.2 and LVGL 9.4. It features optimized memory management strategies for PSRAM-based framebuffers and leverages FreeRTOS for efficient task orchestration.

freertos lvgl
La Marzocco Round Controller

La Marzocco Round Controller

A standalone ESP32-S3 firmware project for a custom round external controller for La Marzocco espresso machines. It utilizes the ESP-IDF framework, FreeRTOS, and the LVGL graphics library to provide an on-device UI, BLE/cloud connectivity, and a local setup portal for managing machine settings and recipes.

freertos lvglnimblelwip
GhostESP

GhostESP

GhostESP is a multi-protocol security testing toolkit for ESP32 microcontrollers, built on the ESP-IDF framework and FreeRTOS. It provides extensive capabilities for Wi-Fi, BLE, Sub-GHz, NFC, and Infrared auditing across a wide range of hardware, including M5Stack devices and custom development boards.

freertos lvgllwip
TINYRadio9 for WT32-SC01-PLUS

TINYRadio9 for WT32-SC01-PLUS

An internet radio project for the WT32-SC01-PLUS (ESP32-S3) module featuring a sophisticated LVGL-based touchscreen interface. It utilizes ESP32-audioI2S for streaming and LittleFS for configuration storage.

freertos littlefslvgl
Desk Weather Clock (GeekMagic-S3)

Desk Weather Clock (GeekMagic-S3)

An ESP32-S3 firmware for the GeekMagic-S3 hardware that displays time, date, and weather data. It leverages FreeRTOS and LVGL to provide a responsive 240x240 UI, features a web configuration interface, and supports remote image and text notifications via HTTP endpoints.

freertos lvglspiffstft-espi