From 12140e416743f081611d4d28905b9447f34e05a4 Mon Sep 17 00:00:00 2001 From: rhysd Date: Mon, 20 Jun 2022 00:35:49 +0900 Subject: [PATCH] tweak examples section style in readme --- README.md | 45 +++++++++++++++++++++++++++++++++------------ 1 file changed, 33 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 792c369..c132b6e 100644 --- a/README.md +++ b/README.md @@ -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 - minimal example -- [`editor`](./examples/editor.rs): Simple text editor to edit multiple files - editor example -- [`single_line`](./examples/single_line.rs): Single-line input form with float number validation - single line example -- [`split`](./examples/split.rs): Two split textareas in a screen and switch them - 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. + +minimal example + +### [`editor`](./examples/editor.rs) + +Simple text editor to edit multiple files. + +editor example + +### [`single_line`](./examples/single_line.rs) + +Single-line input form with float number validation. + +single line example + +### [`split`](./examples/split.rs) + +Two split textareas in a screen and switch them. An example for multiple textarea instances. + +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.