iced/examples
2024-01-04 06:51:21 +01:00
..
arc Fix clippy::default_trait_access 2023-09-20 04:51:08 +02:00
bezier_tool Fix clippy::manual_let_else 2023-09-20 05:30:08 +02:00
checkbox Use workspace dependencies and package inheritance 2023-09-04 13:08:17 +02:00
clock Fix clippy::default_trait_access 2023-09-20 04:51:08 +02:00
color_palette Merge branch 'master' into explicit-text-caching 2023-09-10 00:34:21 +02:00
combo_box Merge branch 'master' into explicit-text-caching 2023-09-10 00:34:21 +02:00
component Use workspace dependencies and package inheritance 2023-09-04 13:08:17 +02:00
counter Add instructions to run web examples 2023-09-09 14:11:40 +02:00
custom_quad Merge branch 'master' into explicit-text-caching 2023-09-10 00:34:21 +02:00
custom_shader Provide actual bounds to Shader primitives 2023-11-28 23:13:38 +01:00
custom_widget Merge branch 'master' into explicit-text-caching 2023-09-10 00:34:21 +02:00
download_progress Run cargo fmt 2023-09-20 05:37:20 +02:00
editor Write documentation for the new text APIs 2023-10-27 05:04:14 +02:00
events Merge branch 'master' into feat/multi-window-support 2023-11-29 22:28:31 +01:00
exit Merge branch 'master' into feat/multi-window-support 2023-11-29 22:28:31 +01:00
game_of_life Make Shrink have priority over Fill in layout 2024-01-04 06:51:21 +01:00
geometry Make Shrink have priority over Fill in layout 2024-01-04 06:51:21 +01:00
gradient Use Radians as a number directly in gradient example 2023-09-08 01:58:52 +02:00
integration Make Shrink have priority over Fill in layout 2024-01-04 06:51:21 +01:00
lazy Add missing 'static lifetimes to constant slices 2023-11-12 03:40:32 +01:00
loading_spinners Make Shrink have priority over Fill in layout 2024-01-04 06:51:21 +01:00
modal Make Shrink have priority over Fill in layout 2024-01-04 06:51:21 +01:00
multi_window Use AtomicU64 for window::Id 2023-12-02 20:41:58 +01:00
multitouch Use workspace dependencies and package inheritance 2023-09-04 13:08:17 +02:00
pane_grid Make Shrink have priority over Fill in layout 2024-01-04 06:51:21 +01:00
pick_list Make Shrink have priority over Fill in layout 2024-01-04 06:51:21 +01:00
pokedex Host GIFs and video examples in iced.rs 2023-09-07 05:05:43 +02:00
progress_bar Use the correct GIF for the progress bar example 2023-11-22 00:32:01 +09:00
qr_code Host GIFs and video examples in iced.rs 2023-09-07 05:05:43 +02:00
screenshot Merge branch 'master' into feat/multi-window-support 2023-11-29 22:28:31 +01:00
scrollable Make Shrink have priority over Fill in layout 2024-01-04 06:51:21 +01:00
sierpinski_triangle Make Shrink have priority over Fill in layout 2024-01-04 06:51:21 +01:00
slider Use workspace dependencies and package inheritance 2023-09-04 13:08:17 +02:00
solar_system Use actual floats for logical coordinates 2023-11-30 23:40:33 +01:00
stopwatch Host GIFs and video examples in iced.rs 2023-09-07 05:05:43 +02:00
styling Make Shrink have priority over Fill in layout 2024-01-04 06:51:21 +01:00
svg Make Shrink have priority over Fill in layout 2024-01-04 06:51:21 +01:00
system_information Chore: Inline format args for ease of reading 2023-09-19 01:32:56 -04:00
toast Make Shrink have priority over Fill in layout 2024-01-04 06:51:21 +01:00
todos Use actual floats for logical coordinates 2023-11-30 23:40:33 +01:00
tooltip Fix clippy::semicolon_if_nothing_returned 2023-09-20 04:11:52 +02:00
tour Make Shrink have priority over Fill in layout 2024-01-04 06:51:21 +01:00
url_handler Merge pull request #2069 from iced-rs/use-workspace-dependencies 2023-09-07 03:30:35 +02:00
visible_bounds Merge branch 'master' into feat/multi-window-support 2023-11-29 22:28:31 +01:00
websocket Make Shrink have priority over Fill in layout 2024-01-04 06:51:21 +01:00
README.md Host GIFs and video examples in iced.rs 2023-09-07 05:05:43 +02: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, 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.