Installation
ratatui
is a standard rust crate and can be installed into your app using the following command:
cargo add ratatui crossterm
or by adding the following to your Cargo.toml
file:
[dependencies]crossterm = "0.27.0"ratatui = "0.26.0"
By default, ratatui
enables the crossterm
, but it’s possible to alternatively use termion
, or
termwiz
instead by enabling the appropriate feature and disabling the default features. See
Backend for more information.
For Termion:
cargo add ratatui --no-default-features --features termioncargo add termion
or in your Cargo.toml
:
[dependencies]ratatui = { version = "0.26", default-features = false, features = ["termion"] }termion = "2.0.1"
For Termwiz:
cargo add ratatui --no-default-features --features termwizcargo add termwiz
or in your Cargo.toml
:
[dependencies]ratatui = { version = "0.26", default-features = false, features = ["termwiz"] }termwiz = "0.20.0"