![]()
Some checks are pending
autofix.ci / format_fix (push) Waiting to run
autofix.ci / lint_typecheck (push) Waiting to run
CI / wasm (push) Blocked by required conditions
CI / wasm_demo (push) Blocked by required conditions
CI / tree-sitter (push) Blocked by required conditions
CI / files-changed (push) Waiting to run
CI / build_and_test (ubuntu-22.04, 1.88) (push) Blocked by required conditions
CI / build_and_test (--exclude ffmpeg --exclude gstreamer-player, macos-14, stable) (push) Blocked by required conditions
CI / build_and_test (--exclude ffmpeg --exclude gstreamer-player, windows-2022, 1.88) (push) Blocked by required conditions
CI / build_and_test (--exclude ffmpeg --exclude gstreamer-player, windows-2022, beta) (push) Blocked by required conditions
CI / build_and_test (--exclude ffmpeg --exclude gstreamer-player, windows-2022, stable) (push) Blocked by required conditions
CI / build_and_test (ubuntu-22.04, nightly) (push) Blocked by required conditions
CI / node_test (macos-14) (push) Blocked by required conditions
CI / node_test (ubuntu-22.04) (push) Blocked by required conditions
CI / node_test (windows-2022) (push) Blocked by required conditions
CI / python_test (macos-14) (push) Blocked by required conditions
CI / python_test (ubuntu-22.04) (push) Blocked by required conditions
CI / python_test (windows-2022) (push) Blocked by required conditions
CI / cpp_test_driver (macos-14) (push) Blocked by required conditions
CI / cpp_test_driver (ubuntu-22.04) (push) Blocked by required conditions
CI / cpp_test_driver (windows-2022) (push) Blocked by required conditions
CI / cpp_cmake (macos-14, 1.88) (push) Blocked by required conditions
CI / cpp_cmake (ubuntu-22.04, stable) (push) Blocked by required conditions
CI / cpp_cmake (windows-2022, nightly) (push) Blocked by required conditions
CI / mcu (pico-st7789, thumbv6m-none-eabi) (push) Blocked by required conditions
CI / mcu (pico2-st7789, thumbv8m.main-none-eabihf) (push) Blocked by required conditions
CI / mcu (stm32h735g, thumbv7em-none-eabihf) (push) Blocked by required conditions
CI / docs (push) Blocked by required conditions
CI / esp-idf-quick (push) Blocked by required conditions
CI / android (push) Blocked by required conditions
CI / miri (push) Blocked by required conditions
CI / test-figma-inspector (push) Blocked by required conditions
CI / cpp_package_test (push) Blocked by required conditions
CI / ffi_32bit_build (push) Blocked by required conditions
CI / vsce_build_test (push) Blocked by required conditions
CI / mcu-embassy (push) Blocked by required conditions
CI / updater_test (0.3.0) (push) Blocked by required conditions
CI / fmt_test (push) Blocked by required conditions
CI / material-components (push) Blocked by required conditions
This is to avoid reserving the `scale` property on every element which is a common property name |
||
---|---|---|
.. | ||
energy-monitor | ||
home-automation | ||
printerdemo | ||
printerdemo_mcu | ||
usecases | ||
weather-demo | ||
CMakeLists.txt | ||
README.md |
Demos
These demos showcase different complex use-cases for building UIs with Slint.
Thumbnail | Description | Demo |
---|---|---|
Printer UI |
A fictional user interface for the touch screen of a printer. Project... |
Wasm Demo |
Energy Meter |
A fictional user interface of a device that monitors energy consumption in a building. Project... |
Wasm Demo |
Weather![]() |
A simple, cross-platform (Desktop, Android, Wasm) weather application using real weather data from the OpenWeather API. Project... |
Wasm Demo |
Usecases |
Different example use cases in one app. Project... |
Wasm Demo |
Running the Rust Demos
You can run the examples either by going into folder or into the rust sub-folder and use cargo run
, for example:
cd demos/printerdemo/rust
cargo run --release
or you can run them from anywhere in the Cargo workspace by name:
cargo run --release --bin printerdemo
Wasm builds
In order to make the wasm build of the example, you first need to edit the Cargo.toml
files to uncomment the line starting with #wasm#
(or use the sed
line bellow)
You can then use wasm-pack (which you may need to obtain with cargo install wasm-pack
).
This will generate the wasm in the ./pkg
directory, which the index.html
file will open.
Since wasm files cannot be served from file://
URL, you need to open a wab server to serve
the content
cd demos/printerdemo/rust
sed -i "s/^#wasm# //" Cargo.toml
wasm-pack build --release --target web
python3 -m http.server
Running the C++ Examples
- When compiling Slint from sources: If you follow the C++ build instructions, this will build the C++ examples as well by default
- From installed binary packages: Simply run cmake in one of the example directory containing a CMakeLists.txt
mkdir build && cd build
cmake -GNinja -DCMAKE_PREFIX_PATH="<path to installed>" ..
cmake --build .
Running the Node Examples
You can run the examples by going into the node sub-folder and use pnpm
, for example:
cd demos/printerdemo/node
pnpm install
pnpm start