| Crates.io | xacli-components |
| lib.rs | xacli-components |
| version | 0.2.0 |
| created_at | 2025-11-27 10:45:00.109375+00 |
| updated_at | 2026-01-15 18:31:04.475532+00 |
| description | Interactive components for XaCLI |
| homepage | |
| repository | https://github.com/yufeiminds/xacli |
| max_upload_size | |
| id | 1953507 |
| size | 94,267 |
Interactive terminal UI components for CLI applications.
| Component | Description |
|---|---|
| Input | Text input with cursor navigation |
| Confirm | Yes/No confirmation dialog |
| Select | Single selection list |
| MultiSelect | Multiple selection list |
| ProgressBar | Progress indicator with multi-thread support |
| Spinner | Loading animation |
use xacli_components::{Input, Select, Confirm};
// Text input
let name = Input::new("Enter your name:")
.default("Alice")
.run()?;
// Selection
let color = Select::new("Choose a color:")
.option("Red", "red")
.option("Green", "green")
.option("Blue", "blue")
.run()?;
// Confirmation
let confirmed = Confirm::new("Save settings?")
.default(true)
.run()?;
cargo run --example input_basic
cargo run --example select_basic
cargo run --example progress_basic
cargo run --example spinner_basic
cargo run --example combined
Apache-2.0