iced/examples
2023-01-09 18:52:38 +01:00
..
arc Derive Copy for Theme 2022-11-03 03:23:36 +01:00
bezier_tool Replace stateful widgets with new iced_pure API 2022-07-27 06:49:20 +02:00
cached Rename SortOrder to Order in cached example 2022-11-03 02:47:43 +01:00
clock Run cargo fmt 2022-11-03 04:35:16 +01:00
color_palette Replace stateful widgets with new iced_pure API 2022-07-27 06:49:20 +02:00
component Replace stateful widgets with new iced_pure API 2022-07-27 06:49:20 +02:00
counter Use ToString for Text::new instead of Into<String> 2022-07-27 06:56:09 +02:00
custom_quad Ask clippy to behave 2022-12-02 19:13:04 +01:00
custom_widget non uniform border radius for quads 2022-11-03 22:48:26 +01:00
download_progress Replace stateful widgets with new iced_pure API 2022-07-27 06:49:20 +02:00
events Replace stateful widgets with new iced_pure API 2022-07-27 06:49:20 +02:00
exit Replace stateful widgets with new iced_pure API 2022-07-27 06:49:20 +02:00
game_of_life Fix clippy lints for Rust 1.66 2022-12-20 11:31:25 +01:00
geometry Derive Default for Rainbow in geometry example 2022-11-28 19:49:23 +01:00
integration_opengl Replace stateful widgets with new iced_pure API 2022-07-27 06:49:20 +02:00
integration_wgpu Initial profiling support for Iced. 2023-01-09 18:52:38 +01:00
lazy Rename cached example to lazy 2022-11-03 02:55:22 +01:00
modal Add Renderer argument to operate 2022-12-22 14:29:24 +01:00
modern_art Fixed issues with old GL versions ( <= 2.1 ) 2022-11-08 13:41:44 -08:00
multitouch Fix multitouch example 2022-11-03 04:42:46 +01:00
pane_grid Update pane_grid example w/ maximize / restore 2022-11-02 17:05:58 -07:00
pick_list Replace stateful widgets with new iced_pure API 2022-07-27 06:49:20 +02:00
pokedex Fix clippy lints 2022-07-27 06:59:54 +02:00
progress_bar Replace stateful widgets with new iced_pure API 2022-07-27 06:49:20 +02:00
qr_code Replace stateful widgets with new iced_pure API 2022-07-27 06:49:20 +02:00
scrollable Box Custom in Theme 2022-11-03 03:27:55 +01:00
sierpinski_triangle Implement sierpinski-triangle example 2022-09-23 17:41:34 +02:00
slider updated README for slider example 2022-12-13 10:13:27 +01:00
solar_system Introduce Custom variants for every style in the built-in Theme 2022-11-09 04:05:31 +01:00
stopwatch Replace stateful widgets with new iced_pure API 2022-07-27 06:49:20 +02:00
styling Box Custom in Theme 2022-11-03 03:27:55 +01:00
svg Showcase color filtering in existing svg example 2022-12-06 04:36:00 +01:00
system_information Include short version in example app 2022-09-23 15:56:37 -05:00
todos Update todos example to select_all input on edit 2022-11-11 09:08:52 -08:00
tooltip Replace stateful widgets with new iced_pure API 2022-07-27 06:49:20 +02:00
tour Reintroduce Element::explain 2022-08-26 20:04:02 +02:00
url_handler Replace stateful widgets with new iced_pure API 2022-07-27 06:49:20 +02:00
websocket Remove patch version from once_cell dependency 2022-11-01 19:55:37 +01:00
README.md Re-introduce the geometry example 2022-11-28 19:42:53 +01:00

Examples

Iced moves fast and the master branch can contain breaking changes! If you want to learn about a specific release, check out the release list.

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_opengl, a demonstration of how to integrate Iced in an existing OpenGL application.
  • integration_wgpu, 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 the various scrollbar width options.
  • 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.