prettui
A terminal-based library to build beautiful and interactive command-line user interfaces in Rust.
Features
- Configurable Lists: Customize items per row, rows per page, and cell width.
- Arrow & Page Navigation: Navigate lists using arrow keys, PageUp/PageDown.
- Numeric Input: Real-time, multi-digit numeric list input with live feedback.
- Custom Colors: Easily style prefixes, prompts, and output text with configurable colors.
- Input and Output Utilities: Flexible input prompts and styled, wrapped console output.
Installation
Add prettui to your Cargo.toml:
[]
= "0.3.3"
Or using command:
cargo add prettui
Then import the prelude in your code:
use *;
Example
use *;
Modules
color: Defines theColorenum and conversions to terminal color types.io::input: Utilities for reading user input, including configurable prompts and text wrapping.io::output: Functions for printing styled and wrapped text, with optional log level tags.list: Interactive list chooser with navigation and numeric input support.
Prelude
For convenience, prettui::prelude re-exports the most commonly used types and functions:
pub use crate*;
pub use crate*;
pub use crate*;
License
This project is licensed under the MIT License. See the LICENSE file for details.