зеркало из
https://github.com/glebtv/tui-textarea.git
synced 2026-09-08 00:15:50 +03:00
tweak examples section style in readme
Этот коммит содержится в:
45
README.md
45
README.md
@@ -21,23 +21,44 @@ text editor can be easily put as part of your TUI application.
|
|||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
- [`minimal`](./examples/minimal.rs): Minimal usage with [crossterm][] support
|
Running `cargo run --example` in this repository can demonstrate usage of tui-textarea.
|
||||||
<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.
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
cargo run --example minimal
|
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
|
## Installation
|
||||||
|
|
||||||
Add `tui-textarea` crate to dependencies in your `Cargo.toml`. This enables crossterm backend support by default.
|
Add `tui-textarea` crate to dependencies in your `Cargo.toml`. This enables crossterm backend support by default.
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user