docs/src/integration/pc/browser.rst
Overview
There are multiple ways to view LVGL UIs in a browser or even develop UIs directly in a browser environment:
Compile UIs to HTML (Emscripten)
Emscripten <https://emscripten.org/>__ can compile C source files into a single HTML output that runs in a browser. This is a convenient way to share developed UIs with stakeholders, as they can test the interface without needing a developer setup.
Instead of producing a binary, Emscripten produces WebAssembly, which is supported across modern browsers.
The lv_web_emscripten <https://github.com/lvgl/lv_web_emscripten>__ project provides a ready-to-use setup for compiling any LVGL UI into a browser-capable HTML file.
It uses a specialized, :ref:build_cmake‑based build system—check the README for full setup details.
Develop in Online VSCode (GitHub Codespaces)
GitHub Codespaces offer a cloud-hosted VSCode environment that runs entirely in the browser.
LVGL provides a preconfigured Codespace environment, which you can launch with just a few clicks. It’s especially beneficial if:
To get started:
https://github.com/lvgl/lvgl <https://github.com/lvgl/lvgl>__../build_all.sh.This will build LVGL and render the UI in a VSCode tab. You can continue writing and rebuilding simply by running the script again.
Note: The Codespaces setup also uses Emscripten for browser rendering.
LVGL’s UI Editor Online Share
Coming soon.