uxterm

Crates.iouxterm
lib.rsuxterm
version1.1.0
created_at2025-08-21 08:20:25.529633+00
updated_at2025-10-08 14:22:22.241464+00
descriptionA user experience-focused terminal UI library built with Crossterm.
homepagehttps://github.com/pjdur/uxterm
repositoryhttps://github.com/pjdur/uxterm
max_upload_size
id1804439
size34,481
Pjdur (Pjdur)

documentation

https://docs.rs/uxterm

README

uxterm

uxterm is a user experience-focused terminal UI (TUI) library for Rust, built on top of Crossterm. It provides a simple, modular system for building interactive terminal interfaces with checkboxes, sliders, buttons, and labels — all with clean input handling and cross-platform rendering.


✨ Features

  • ✅ Easy-to-use widget system
  • ✅ Checkbox, slider, button, and label components
  • ✅ Keyboard navigation with TAB, SPACE, +/-, and ESC
  • ✅ Blocking input with smooth key handling (no double toggles!)
  • ✅ Cross-platform rendering (macOS, Windows, Linux)
  • ✅ Return value system for collecting user input

🚀 Getting Started

Add uxterm to your Cargo.toml:

[dependencies]
uxterm = "1.1.0"

Then build your UI:

use uxterm::*;

fn main() -> std::io::Result<()> {
    let mut view = View::new("Ice Cream Selector");

    view.add(Label::new("Choose your ice cream flavours:"));
    view.add(Checkbox::new("Vanilla"));
    view.add(Checkbox::new("Chocolate"));
    view.add(Checkbox::new("Strawberry"));
    view.add(Checkbox::new("Mint"));
    view.add(Checkbox::new("Cookie Dough"));
    view.add(Label::new("Press TAB to switch, SPACE to toggle, ESC to finish"));

    let result = run(view)?;

    println!("\nYour ice cream will include:");
    for ingredient in result {
        println!("- {}", ingredient);
    }

    Ok(())
}

📦 Crate Info

  • Author: pjdur
  • Repository: github.com/pjdur/uxterm
  • License: MIT
  • Keywords: tui, terminal, ui, crossterm, ux
  • Categories: Command-line utilities, GUI, Development tools

🛠 Widgets

Widget Description
Label Static text
Checkbox Toggleable options
Slider Adjustable numeric input
Button Clickable action (customizable)
Input Text input field

📣 Contributing

Pull requests, ideas, and feedback are welcome! Feel free to open an issue or fork the repo to experiment.


📜 License

Licensed under the MIT License.

Commit count: 9

cargo fmt