1
0
зеркало из https://github.com/glebtv/tui-textarea.git synced 2026-09-03 14:26:17 +03:00

tweak examples section style in readme

Этот коммит содержится в:
rhysd
2022-06-20 00:35:49 +09:00
родитель a852f84fbc
Коммит 12140e4167

Просмотреть файл

@@ -21,23 +21,44 @@ text editor can be easily put as part of your TUI application.
## Examples
- [`minimal`](./examples/minimal.rs): Minimal usage with [crossterm][] support
<img src="https://raw.githubusercontent.com/rhysd/ss/master/tui-textarea/minimal.gif" width=539 height=172 alt="minimal example">
- [`editor`](./examples/editor.rs): Simple text editor to edit multiple files
<img src="https://raw.githubusercontent.com/rhysd/ss/master/tui-textarea/editor.gif" width=539 height=172 alt="editor example">
- [`single_line`](./examples/single_line.rs): Single-line input form with float number validation
<img src="https://raw.githubusercontent.com/rhysd/ss/master/tui-textarea/single_line.gif" width=539 height=92 alt="single line example">
- [`split`](./examples/split.rs): Two split textareas in a screen and switch them
<img src="https://raw.githubusercontent.com/rhysd/ss/master/tui-textarea/split.gif" width=539 height=124 alt="multiple textareas example">
- [`termion`](./examples/termion.rs): Minimal usage with [termion][] support
- [`variable`](./examples/variable.rs): Simple textarea with variable height following the number of lines
Running `cargo run` in this repository can demonstrate usage of tui-textarea.
Running `cargo run --example` in this repository can demonstrate usage of tui-textarea.
```sh
cargo run --example minimal
```
### [`minimal`](./examples/minimal.rs)
Minimal usage with [crossterm][] support.
<img src="https://raw.githubusercontent.com/rhysd/ss/master/tui-textarea/minimal.gif" width=539 height=172 alt="minimal example">
### [`editor`](./examples/editor.rs)
Simple text editor to edit multiple files.
<img src="https://raw.githubusercontent.com/rhysd/ss/master/tui-textarea/editor.gif" width=539 height=172 alt="editor example">
### [`single_line`](./examples/single_line.rs)
Single-line input form with float number validation.
<img src="https://raw.githubusercontent.com/rhysd/ss/master/tui-textarea/single_line.gif" width=539 height=92 alt="single line example">
### [`split`](./examples/split.rs)
Two split textareas in a screen and switch them. An example for multiple textarea instances.
<img src="https://raw.githubusercontent.com/rhysd/ss/master/tui-textarea/split.gif" width=539 height=124 alt="multiple textareas example">
### [`termion`](./examples/termion.rs)
Minimal usage with [termion][] support. To run this example, `termion` feature needs to be enabled.
### [`variable`](./examples/variable.rs)
Simple textarea with variable height following the number of lines.
## Installation
Add `tui-textarea` crate to dependencies in your `Cargo.toml`. This enables crossterm backend support by default.