Run examples
Try a layout in the browser, or run a complete program with display setup, input and cleanup. The examples below cover both.
Try layouts in the browser
Try changing a layout on this page and running it. Examples and supported edits run in your browser and accept input immediately; see the supported syntax. For state connected to controls, start with the switch example.
Arrange a row

Loading the interactive example…
Try changing the row's spacing or replacing row with column. The child collection still defines the order; the container changes the layout direction.
Place cells in a grid

Loading the interactive example…
Change a child's .grid_cell(...) to move it to another cell. Changing the collection order alone does not override an explicit cell assignment. The Arrange widgets explains composition and stable keys; the playground contains the full preset collection.
Run a complete application
The workspace ships its runnable examples in the rs_lvgl_ui package. Ten focused examples each demonstrate one behavior; their source files are in the repository-level examples/ directory, and rs_lvgl_ui/Cargo.toml attaches each file to an example target with explicit required features. The larger galleries live in rs_lvgl_ui/examples/.
Prepare the desktop environment
Install Rust, a C compiler and libclang as described in Getting started, then install SDL2 for the window, mouse and keyboard:
If the linker cannot find SDL2, set its library directory:
The component studio includes Lottie, which also needs a C++14 compiler. Xcode Command Line Tools on macOS and g++ above provide it.
Get and run the examples
These commands run examples from the repository. To add the library to your own project, use the crates.io installation in Getting started.
A button counter window opens; clicking the button increments the count. Run subsequent commands from the repository root, choosing an example name and its required features:
--features adds capabilities to the crate's default set. The table lists the full required-features value declared for each target; the commands below work with defaults enabled. If --no-default-features is passed to test a reduced build, every required feature must be provided explicitly.
Open the component preview for interactive WebAssembly controls and animations. The desktop and browser editions share the same Rust views.
The targets below add display setup, an event loop and teardown. Use these when learning state changes and native input.
Focused examples
For example:
Each focused example opens a 640 x 480 SDL window titled rs_lvgl / <name>. The shared frame shows a small repository label, the example title, a one-line description and a surface card containing the interactive content. The theme is light by default. Close the window to exit; the program prints a frame and node count during teardown.
Three environment variables adjust a run:
EXAMPLE_DARK=1selects the dark theme.EXAMPLE_FRAMES=100stops after the given number of frames instead of waiting for the window to close.EXAMPLE_CAPTURE_DIR=target/captureswrites initial and final PPM snapshots.
Shared host
The ten focused examples share examples/support/mod.rs. Its run function creates the SDL window and mouse, initializes LVGL, mounts the App, and runs the common timer_handler, drain and Ui::tick sequence. Each example keeps its state, component action enum and view in one file. Tests beside each example render the same view on a memory display and dispatch native pointer events, so interaction assertions do not depend on a window server.
button_click.rs is the smallest complete state/message/view cycle; sdl_demo.rs shows the same host with a composite component.
Galleries
These targets cover the wider component and widget surface. The commands below use the aggregating features where one exists.
studio opens a window titled rs_lvgl / Component Studio. Select a category in the sidebar, drag a slider or toggle a switch. Tab and Shift-Tab move focus; Enter activates a control. Reset restores the example state while retaining the category and theme. Exit studio closes the window. showcase includes the widgets, fonts and media extensions used by the studio.
capability-gallery is the aggregate feature set for capabilities: it contains every feature that target requires. settings does not open a window; it registers a 320 x 240 memory display, mounts the screen, drains four messages and prints created, deleted and moved node counts before unmounting.

The component studio guide documents its eleven categories and native checks. The focused example sources and their shared host are listed in examples/README.md.
Run and capture the studio automatically
To visit every category in a bounded run:
Set STUDIO_CAPTURE_DIR=target/studio-captures to write PPM snapshots. The studio uses synthetic data and local resources; it needs no network service or application filesystem.
Check the native runs
On headless Linux, run it under a virtual display:
The runner builds the examples with showcase,font-cjk-14,rust_timer, runs their native tests serially, and executes twenty bounded native scenarios across the focused examples and galleries. Logs and snapshots are written under target/ui-audit.
These checks exercise actual views on memory displays and separate SDL smoke runs. SDL smoke proves that a native window can open and close; it does not emulate operating-system input or certify a physical board.