# cliux
**Styled terminal output made simple.**
`cliux` is a lightweight Rust crate for formatting terminal output with clean, readable components — no TUI required. It helps CLI tools present information with structure and style using boxes, sections, dividers, lists, tags, and smart padding.
## ✨ Features
- `Boxed` — bordered containers with titles and content
- `Section` — titled blocks with horizontal dividers
- `Divider` — customizable horizontal lines
- `List` — bullet-pointed lists with customizable styles
- `Tag` — colored tags with customizable styles
- `Padding` — Unicode-aware padding (emoji-safe)
- `Input` — interactive input fields with customizable styles
- `Confirm` — interactive confirmation prompts with customizable styles
## Examples
### Boxed
```rust
use cliux::Boxed;
fn main() {
Boxed::new("Cliux Boxed")
.content("This code uses the cliux library to create a boxed section.")
.width(61)
.print();
}
```
### Label
```rust
use cliux::Label;
fn main() {
Label::new("INFO").style("info").print();
Label::new("✓ Done").style("success").print();
Label::new("ERROR").style("error").print();
}
```
### Section
```rust
use cliux::Section;
fn main() {
Section::new("Wrapped Section")
.content("This is a long sentence that will be wrapped intelligently across multiple lines.")
.width(40)
.wrap(true)
.style('─')
.print();
}
```
### Divider
```rust
use cliux::Divider;
fn main() {
Divider::new(30).style('=').print();
}
```
### List
```rust
use cliux::List;
fn main() {
List::new(vec!["First item", "Second item", "Third item"])
.bullet("*")
.width(40)
.print();
List::new(vec!["One", "Two", "Three"])
.numbered()
.print();
}
```
### Tag
```rust
use cliux::Tag;
fn main() {
Tag::new("beta").rounded().color("yellow").bold(true).print();
Tag::new("admin").curly().color("red").print();
Tag::new("draft").print();
}
```
### Table
```rust
use cliux::Table;
fn main() {
Table::new()
.headers(&["Name", "Status"])
.row(&["cliux", "active"])
.row(&["other", "pending"])
.widths(&[20, 10])
.bordered(true)
.print();
}
```
### Note
```rust
use cliux::Note;
fn main() {
Note::new("Be careful with this setting.")
.kind("warning")
.style("rounded")
.width(40)
.print();
Note::new("Tip: You can use --force here.")
.kind("info")
.style("+")
.width(40)
.print();
}
```
### Input
```rust
use cliux::Input;
fn main() {
let name = Input::new("What's your name?")
.default("Anonymous")
.bold(true)
.color("cyan")
.style("rounded")
.width(40)
.prompt();
println!("Hello, {}!", name);
}
```
### Confirm
```rust
use cliux::Confirm;
fn main() {
let confirmed = Confirm::new("Delete file?")
.color("red")
.bold(true)
.style("square")
.width(40)
.default(false)
.prompt();
if confirmed {
println!("File deleted.");
} else {
println!("Operation cancelled.");
}
}
```
## 📚 Usage
Add to your `Cargo.toml`:
```toml
cliux = "0.5.1"
```
## Screenshots
### Boxed

### Label

### Section

### Divider

### List

### Tag

### Table

### Note

### Input

### Confirm

## 🚧 Status
This is an early release. Components and layout may evolve. Contributions and feedback welcome!