| 1 |
![Lines of Code][s7] [![MIT][s2]][l2] [![Join us on Discord][s5]][l5] |
| 2 |
|
| 3 |
# Crossterm Examples |
| 4 |
|
| 5 |
The examples are compatible with the latest release. |
| 6 |
|
| 7 |
## Structure |
| 8 |
|
| 9 |
``` |
| 10 |
├── examples |
| 11 |
│ └── interactive-test |
| 12 |
│ └── event-* |
| 13 |
│ └── stderr |
| 14 |
``` |
| 15 |
| File Name | Description | Topics | |
| 16 |
|:----------------------------|:-------------------------------|:------------------------------------------| |
| 17 |
| `examples/interactive-test` | interactive, walk through, demo | cursor, style, event | |
| 18 |
| `event-*` | event reading demos | (async) event reading | |
| 19 |
| `stderr` | crossterm over stderr demo | raw mode, alternate screen, custom output | |
| 20 |
| `is_tty` | Is this instance a tty ? | tty | |
| 21 |
|
| 22 |
## Run examples |
| 23 |
|
| 24 |
```bash |
| 25 |
$ cargo run --example [file name] |
| 26 |
``` |
| 27 |
|
| 28 |
To run the interactive-demo go into the folder `examples/interactive-demo` and run `cargo run`. |
| 29 |
|
| 30 |
## License |
| 31 |
|
| 32 |
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE) file for details. |
| 33 |
|
| 34 |
[s2]: https://img.shields.io/badge/license-MIT-blue.svg |
| 35 |
[l2]: LICENSE |
| 36 |
|
| 37 |
[s5]: https://img.shields.io/discord/560857607196377088.svg?logo=discord |
| 38 |
[l5]: https://discord.gg/K4nyTDB |
| 39 |
|
| 40 |
[s7]: https://travis-ci.org/crossterm-rs/examples.svg?branch=master |