Expand description
§Boxy CLI
A Rust library for creating beautifully styled text boxes in command-line interfaces.
boxy-cli provides an easy way to create and display text boxes with various border styles,
colors, and alignment options. It’s perfect for creating eye-catching CLI applications,
status displays, or simply organizing text output in a visually appealing way.
§Features
- Multiple border styles (single, double, bold, rounded, etc.)
- Colored borders and text using hex color codes
- Customizable internal and external padding
- Text alignment options (left, center, right)
- Support for multiple text segments with dividers
- Builder pattern for fluent API usage
- Dynamic sizing based on terminal dimensions
§Quick Start
use boxy_cli::prelude::*;
fn main() {
// Create a text box with fluent builder API
Boxy::builder()
.box_type(BoxType::Double)
.color("#00ffff")
.add_segment("Hello, Boxy!", "#ffffff", BoxAlign::Center)
.add_segment("A beautiful CLI box library", "#32CD32", BoxAlign::Center)
.padding(BoxPad::uniform(1), BoxPad::vh(1, 2))
.build()
.display();
}§Detailed docs
See the Boxy struct or the BoxyBuilder struct for more information.
§Usage Examples
See the README for more examples and usage information.
Re-exports§
pub use prelude::*;
Modules§
- boxer
- The main crate logic
- constructs
- The main datatypes and enums used by the
Boxystruct. - macros
- The boxy! macro
- prelude
- Convenient imports for working with Boxy CLI.
- templates
- The structs for the box border characters
Macros§
- boxy
- Macro for creating a new Boxy struct