iced-mobile/examples
Héctor Ramón Jiménez 6d7f2b30cc Simplify drawing logic in `clock` example 2020-04-14 07:19:50 +02:00
..
bezier_tool Fix `bezier_tool` placeholder text alignment 2020-04-10 02:49:04 +02:00
clock Simplify drawing logic in `clock` example 2020-04-14 07:19:50 +02:00
counter Create `README` files for all the examples 2020-02-21 15:20:05 +01:00
custom_widget Create `README` files for all the examples 2020-02-21 15:20:05 +01:00
download_progress Allow passing external state to `Application::new` 2020-03-30 18:10:15 +02:00
events Allow passing external state to `Application::new` 2020-03-30 18:10:15 +02:00
geometry Implement `Primitive::Cached` 2020-03-07 23:45:54 +01:00
integration Merge pull request #240 from kaimast/master 2020-03-28 13:43:04 +01:00
pane_grid Implement `padding` support for `Container` 2020-03-31 01:21:51 +02:00
pokedex Merge pull request #246 from hecrj/feature/application-flags 2020-03-31 17:49:56 +02:00
progress_bar Create `README` files for all the examples 2020-02-21 15:20:05 +01:00
solar_system Implement `canvas::Path::circle` helper method 2020-04-14 06:54:12 +02:00
stopwatch Allow passing external state to `Application::new` 2020-03-30 18:10:15 +02:00
styling Change selection color in `styling` example 2020-03-24 21:51:56 +01:00
svg Merge branch 'master' into feature/container-padding 2020-03-31 17:11:58 +02:00
todos Allow passing external state to `Application::new` 2020-03-30 18:10:15 +02:00
tour Simplify `Language` conversion in `tour` 2020-04-06 20:12:16 +02:00
README.md Update `README` of examples 2020-03-23 21:04:20 +01:00

README.md

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

The web version can be run by following the usage instructions of iced_web or by accessing iced.rs!

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

We have not yet implemented a LocalStorage version of the auto-save feature. Therefore, it does not work on web yet!

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 lyon.
  • clock, an application that uses the Canvas widget to draw a clock and its hands to display the current time.
  • 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 graphical application.
  • pane_grid, a grid of panes that can be split, resized, and reorganized.
  • 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.
  • 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, it has been powering the user interfaces in Coffee, an experimental 2D game engine.