iced-yoda/examples
Ian Douglas Scott d0b4d0e9c9
examples: Add sctk_subsurface_img
Test scrolling. Single color buffers in `sctk_subsurface` aren't good
for comparing it, and `sctk_subsurface_gst` isn't working on latest gst
with explicit sync (and AppSync isn't accepting the dmabuf when I try to
modify it.)
2026-01-27 16:26:09 -05:00
..
arc Use winit to obtain current theme::Mode 2025-09-08 05:16:20 +02:00
bezier_tool Rename space_{x,y} to space::{horizontal,vertical} 2025-09-18 00:00:56 +02:00
changelog Update CHANGELOG 2025-12-03 19:50:18 +01:00
checkbox Make label optional for checkbox widget 2025-11-25 08:58:44 +01:00
clock Fix clippy lints for Rust 1.88 🎉 2025-06-27 00:00:49 +02:00
color_palette Add elided lifetimes to view helpers in examples 2025-06-24 14:29:36 +02:00
combo_box Add text_shaping method to combo_box widget 2025-11-20 01:08:29 +01:00
counter feat: pop-os megasquash 2026-01-21 13:12:08 -05:00
custom_quad Fix inconsistent naming of tree parameter in Widget trait (#2950) 2025-11-25 23:58:07 +01:00
custom_shader Introduce Pipeline trait in wgpu::primitive 2025-11-25 09:36:25 +01:00
custom_widget Fix inconsistent naming of tree parameter in Widget trait (#2950) 2025-11-25 23:58:07 +01:00
delineate Implement is_focused selector and unify selector API 2025-11-18 23:03:41 +01:00
download_progress Add elided lifetimes to view helpers in examples 2025-06-24 14:29:36 +02:00
editor feat: pop-os megasquash 2026-01-21 13:12:08 -05:00
events Make label optional for checkbox widget 2025-11-25 08:58:44 +01:00
exit Add theme and theme_changes functions to system 2025-09-08 14:32:24 +02:00
ferris Make label optional for checkbox widget 2025-11-25 08:58:44 +01:00
gallery Smooth out auto-scrolling speed scaling in scrollable 2025-11-28 06:29:25 +01:00
game_of_life feat: pop-os megasquash 2026-01-21 13:12:08 -05:00
geometry Fix Message type to Never in UpdateFn for () 2025-12-07 01:42:42 +01:00
gradient feat: pop-os megasquash 2026-01-21 13:12:08 -05:00
integration feat: pop-os megasquash 2026-01-21 13:12:08 -05:00
layout Avoid quick flashes in layout and styling examples 2025-12-02 18:38:19 +01:00
lazy feat: pop-os megasquash 2026-01-21 13:12:08 -05:00
list Infinite List widget from upstream feature/list-widget-reloaded branch 2026-01-26 13:10:42 -05:00
loading_spinners feat: pop-os megasquash 2026-01-21 13:12:08 -05:00
loupe feat: pop-os megasquash 2026-01-21 13:12:08 -05:00
markdown Implement markdown incremental code highlighting 2026-01-26 18:41:29 -05:00
modal Rename space_{x,y} to space::{horizontal,vertical} 2025-09-18 00:00:56 +02:00
multi_window feat: subsurfaces 2026-01-23 15:39:35 -05:00
multitouch Add elided lifetimes to view helpers in examples 2025-06-24 14:29:36 +02:00
pane_grid Unify keyboard subscriptions into listen 2025-12-02 18:35:50 +01:00
pick_list Rename space_{x,y} to space::{horizontal,vertical} 2025-09-18 00:00:56 +02:00
pokedex feat: pop-os megasquash 2026-01-21 13:12:08 -05:00
progress_bar Make label optional for checkbox widget 2025-11-25 08:58:44 +01:00
qr_code Use winit to obtain current theme::Mode 2025-09-08 05:16:20 +02:00
screenshot feat: pop-os megasquash 2026-01-21 13:12:08 -05:00
scrollable feat: pop-os megasquash 2026-01-21 13:12:08 -05:00
sctk_drag refactor: use cctk 2026-01-23 11:16:56 -05:00
sctk_lazy feat: pop-os megasquash 2026-01-21 13:12:08 -05:00
sctk_session_lock feat: pop-os megasquash 2026-01-21 13:12:08 -05:00
sctk_subsurface feat: subsurfaces 2026-01-23 15:39:35 -05:00
sctk_subsurface_gst examples: Update gstreamer 2026-01-27 16:26:08 -05:00
sctk_subsurface_img examples: Add sctk_subsurface_img 2026-01-27 16:26:09 -05:00
sctk_todos refactor: add namespace 2026-01-23 11:28:35 -05:00
sierpinski_triangle Add elided lifetimes to view helpers in examples 2025-06-24 14:29:36 +02:00
slider Add elided lifetimes to view helpers in examples 2025-06-24 14:29:36 +02:00
solar_system Add elided lifetimes to view helpers in examples 2025-06-24 14:29:36 +02:00
stopwatch Remove theme method in stopwatch example 2025-12-05 03:38:28 +01:00
styling Avoid quick flashes in layout and styling examples 2025-12-02 18:38:19 +01:00
svg feat: pop-os megasquash 2026-01-21 13:12:08 -05:00
table Use winit to obtain current theme::Mode 2025-09-08 05:16:20 +02:00
the_matrix Add elided lifetimes to view helpers in examples 2025-06-24 14:29:36 +02:00
toast feat: pop-os megasquash 2026-01-21 13:12:08 -05:00
todos refactor: apply requested size for surface after creation 2026-01-21 14:51:09 -05:00
tooltip feat: pop-os megasquash 2026-01-21 13:12:08 -05:00
tour feat: pop-os megasquash 2026-01-21 13:12:08 -05:00
vectorial_text Fix inconsistent naming of tree parameter in Widget trait (#2950) 2025-11-25 23:58:07 +01:00
websocket feat: pop-os megasquash 2026-01-21 13:12:08 -05: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.