mirror of
https://github.com/ratatui-org/ratatui
synced 2024-11-22 20:53:19 +00:00
Update README
This commit is contained in:
parent
116ee4439a
commit
c7f5f34eb5
1 changed files with 16 additions and 3 deletions
19
README.md
19
README.md
|
@ -32,7 +32,7 @@ you may rely on the previously cited libraries to achieve such features.
|
|||
|
||||
```toml
|
||||
[dependencies]
|
||||
tui = "0.1"
|
||||
tui = "0.1.1"
|
||||
```
|
||||
|
||||
## Get Started
|
||||
|
@ -44,7 +44,8 @@ The first thing to do is to choose from one of the two backends:
|
|||
For Termion:
|
||||
|
||||
```rust
|
||||
use tui::{Terminal, TermionBackend};
|
||||
use tui::Terminal;
|
||||
use tui::backend::TermionBackend;
|
||||
|
||||
fn main() {
|
||||
let backend = TermionBackend::new().unwrap();
|
||||
|
@ -55,7 +56,8 @@ fn main() {
|
|||
For Rustbox:
|
||||
|
||||
```rust
|
||||
use tui::{Terminal, RustboxBackend};
|
||||
use tui::Terminal;
|
||||
use tui::backend::RustboxBackend;
|
||||
|
||||
fn main() {
|
||||
let backend = RustboxBackend::new().unwrap();
|
||||
|
@ -63,6 +65,17 @@ fn main() {
|
|||
}
|
||||
```
|
||||
|
||||
By default both backends are enabled but you might want to use only one. To do
|
||||
so, you should disable the default-features for this library and specify the
|
||||
chosen backend in features.
|
||||
|
||||
```toml
|
||||
[dependencies.tui]
|
||||
version = "0.1.1"
|
||||
default-features = false
|
||||
features = ['termion']
|
||||
```
|
||||
|
||||
### Layout
|
||||
|
||||
The library comes with a basic yet useful layout management object called
|
||||
|
|
Loading…
Reference in a new issue