iced/examples
2025-04-01 02:57:46 +02:00
..
arc Update all examples to Rust 2024 2025-02-21 01:37:14 +01:00
bezier_tool Update all examples to Rust 2024 2025-02-21 01:37:14 +01:00
changelog Update all examples to Rust 2024 2025-02-21 01:37:14 +01:00
checkbox Update all examples to Rust 2024 2025-02-21 01:37:14 +01:00
clock Introduce text::Alignment with Justified support 2025-03-11 02:30:50 +01:00
color_palette get rid of palette dependency 2025-04-01 02:57:46 +02:00
combo_box Update all examples to Rust 2024 2025-02-21 01:37:14 +01:00
counter Update all examples to Rust 2024 2025-02-21 01:37:14 +01:00
custom_quad Update all examples to Rust 2024 2025-02-21 01:37:14 +01:00
custom_shader Update all examples to Rust 2024 2025-02-21 01:37:14 +01:00
custom_widget Update all examples to Rust 2024 2025-02-21 01:37:14 +01:00
download_progress Use new async || closure syntax 🎉 2025-02-21 02:01:42 +01:00
editor Update all examples to Rust 2024 2025-02-21 01:37:14 +01:00
events Update all examples to Rust 2024 2025-02-21 01:37:14 +01:00
exit Update all examples to Rust 2024 2025-02-21 01:37:14 +01:00
ferris Update all examples to Rust 2024 2025-02-21 01:37:14 +01:00
gallery Use new async || closure syntax 🎉 2025-02-21 02:01:42 +01:00
game_of_life Introduce text::Alignment with Justified support 2025-03-11 02:30:50 +01:00
geometry Update all examples to Rust 2024 2025-02-21 01:37:14 +01:00
gradient Update all examples to Rust 2024 2025-02-21 01:37:14 +01:00
integration Split local state from Engine in iced_wgpu 2025-03-24 20:22:15 +01:00
layout Update all examples to Rust 2024 2025-02-21 01:37:14 +01:00
lazy Update all examples to Rust 2024 2025-02-21 01:37:14 +01:00
loading_spinners Update all examples to Rust 2024 2025-02-21 01:37:14 +01:00
loupe Update all examples to Rust 2024 2025-02-21 01:37:14 +01:00
markdown Update all examples to Rust 2024 2025-02-21 01:37:14 +01:00
modal Update all examples to Rust 2024 2025-02-21 01:37:14 +01:00
multi_window Fix multi_window example scrollable layout 2025-03-24 20:28:14 +01:00
multitouch Update all examples to Rust 2024 2025-02-21 01:37:14 +01:00
pane_grid Update all examples to Rust 2024 2025-02-21 01:37:14 +01:00
pick_list Update all examples to Rust 2024 2025-02-21 01:37:14 +01:00
pokedex Update all examples to Rust 2024 2025-02-21 01:37:14 +01:00
progress_bar Update all examples to Rust 2024 2025-02-21 01:37:14 +01:00
qr_code Update all examples to Rust 2024 2025-02-21 01:37:14 +01:00
screenshot Update all examples to Rust 2024 2025-02-21 01:37:14 +01:00
scrollable Update all examples to Rust 2024 2025-02-21 01:37:14 +01:00
sierpinski_triangle Take Event by reference in Widget::update 2025-02-04 01:26:59 +01:00
slider Update all examples to Rust 2024 2025-02-21 01:37:14 +01:00
solar_system Update all examples to Rust 2024 2025-02-21 01:37:14 +01:00
stopwatch Update all examples to Rust 2024 2025-02-21 01:37:14 +01:00
styling Test different Theme variants in styling example 2025-04-01 02:55:27 +02:00
svg Update all examples to Rust 2024 2025-02-21 01:37:14 +01:00
system_information Update all examples to Rust 2024 2025-02-21 01:37:14 +01:00
the_matrix Update all examples to Rust 2024 2025-02-21 01:37:14 +01:00
toast Update all examples to Rust 2024 2025-02-21 01:37:14 +01:00
todos Append renderer name to iced_test snapshots 2025-03-24 20:22:17 +01:00
tooltip Update all examples to Rust 2024 2025-02-21 01:37:14 +01:00
tour Remove open dependency for tour on Wasm 2025-03-11 02:51:05 +01:00
url_handler Update all examples to Rust 2024 2025-02-21 01:37:14 +01:00
vectorial_text Introduce text::Alignment with Justified support 2025-03-11 02:30:50 +01:00
visible_bounds Update all examples to Rust 2024 2025-02-21 01:37:14 +01:00
websocket Use new async || closure syntax 🎉 2025-02-21 02:01:42 +01:00
README.md Link to the latest branch in examples' README 2024-05-27 21:44:44 +02:00

Examples

Iced moves fast and the master branch can contain breaking changes! If you want to browse examples that are compatible with the latest release, then switch to the latest branch.

Tour

A simple UI tour that can run both on native platforms and the web! It showcases different widgets that can be built using Iced.

The main file contains all the code of the example! All the cross-platform GUI is defined in terms of state, messages, update logic and view logic.

You can run the native version with cargo run:

cargo run --package tour

Todos

A todos tracker inspired by TodoMVC. It showcases dynamic layout, text input, checkboxes, scrollables, icons, and async actions! It automatically saves your tasks in the background, even if you did not finish typing them.

The example code is located in the main file.

You can run the native version with cargo run:

cargo run --package todos

Game of Life

An interactive version of the Game of Life, invented by John Horton Conway.

It runs a simulation in a background thread while allowing interaction with a Canvas that displays an infinite grid with zooming, panning, and drawing support.

The relevant code is located in the main file.

You can run it with cargo run:

cargo run --package game_of_life

Styling

An example showcasing custom styling with a light and dark theme.

The example code is located in the main file.

You can run it with cargo run:

cargo run --package styling

Extras

A bunch of simpler examples exist:

  • bezier_tool, a Paint-like tool for drawing Bézier curves using the Canvas widget.
  • clock, an application that uses the Canvas widget to draw a clock and its hands to display the current time.
  • color_palette, a color palette generator based on a user-defined root color.
  • counter, the classic counter example explained in the README.
  • custom_widget, a demonstration of how to build a custom widget that draws a circle.
  • download_progress, a basic application that asynchronously downloads a dummy file of 100 MB and tracks the download progress.
  • events, a log of native events displayed using a conditional Subscription.
  • geometry, a custom widget showcasing how to draw geometry with the Mesh2D primitive in iced_wgpu.
  • integration, a demonstration of how to integrate Iced in an existing wgpu application.
  • pane_grid, a grid of panes that can be split, resized, and reorganized.
  • pick_list, a dropdown list of selectable options.
  • pokedex, an application that displays a random Pokédex entry (sprite included!) by using the PokéAPI.
  • progress_bar, a simple progress bar that can be filled by using a slider.
  • scrollable, a showcase of various scrollable content configurations.
  • sierpinski_triangle, a sierpiński triangle Emulator, use Canvas and Slider.
  • solar_system, an animated solar system drawn using the Canvas widget and showcasing how to compose different transforms.
  • stopwatch, a watch with start/stop and reset buttons showcasing how to listen to time.
  • svg, an application that renders the Ghostscript Tiger by leveraging the Svg widget.

All of them are packaged in their own crate and, therefore, can be run using cargo:

cargo run --package <example>

Coffee

Since Iced was born in May 2019, it has been powering the user interfaces in Coffee, an experimental 2D game engine.