summaryrefslogtreecommitdiffstats
path: root/examples/counter/README.md
blob: 18761bbad42378de2b4e61ad691a6c890211eb7a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
## Counter

The classic counter example explained in the [`README`](../../README.md).

The __[`main`]__ file contains all the code of the example.

<div align="center">
  <img src="https://iced.rs/examples/counter.gif">
</div>

You can run it with `cargo run`:
```
cargo run --package counter
```

The web version can be run with [`trunk`]:

```
cd examples/counter
trunk serve
```

[`main`]: src/main.rs
[`trunk`]: https://trunkrs.dev/