#ratatui-widgets #goal #stack #container #building #button #mouse #harmonious

tui-framework-experiment

An set of harmonious Ratatui widgets with a goal of building a proper widget framework

2 unstable releases

0.4.0 Feb 9, 2025
0.3.0 Oct 19, 2024

#1298 in Command-line interface

Download history 686/week @ 2025-10-27 536/week @ 2025-11-03 600/week @ 2025-11-10 892/week @ 2025-11-17 1030/week @ 2025-11-24 933/week @ 2025-12-01 1290/week @ 2025-12-08 1440/week @ 2025-12-15 164/week @ 2025-12-22 195/week @ 2025-12-29 818/week @ 2026-01-05 943/week @ 2026-01-12 1029/week @ 2026-01-19 1272/week @ 2026-01-26 1873/week @ 2026-02-02 1468/week @ 2026-02-09

5,672 downloads per month

MIT/Apache

45KB
751 lines

tui-framework-experiment

Crates.io Badge License Badge Docs.rs Badge
Deps.rs Badge Codecov.io Badge Discord Badge

tui-framework-experiment is a Rust crate with extra widgets for Ratatui, previously published as Ratatui-widgets

Installation

cargo add tui-framework-experiment

Usage

// TODO: Add usage examples

Example

Button

Status

This README sets up an initial goal for a library of widgets to supplement Ratatui. This library will release breaking changes regularly - move fast and break things. A focus on fast delivery rather than gating on perfection is key here. Expect to see releases anytime a feature is changed or added. Release-plz will keep the version updated with respect to semver and will update the CHANGELOG with information from every PR.

This is not (yet?) an official Ratatui-org project, but may be at some point in the future.

Features

  • Basic event handling abstraction and keyboard / mouse handling

  • Basic buttons

    let button = Button::new("Click me");
    
  • Stack container that handles widgets and layouts

    let stack = StackContainer::horizontal().with_widgets(vec![
        (Box::new(Line::raw("Left")), Constraint::Fill(1)),
        (Box::new(Text::raw("Center")), Constraint::Fill(1)),
        (Box::new(Span::raw("Right")), Constraint::Fill(1)),
    ]);
    

TODO

Most of this list of widgets from https://en.wikipedia.org/wiki/Graphical_widget#List_of_common_generic_widgets

License

Copyright (c) 2024 Josh McKinney

This project is licensed under either of:

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

See CONTRIBUTING.md.

Dependencies

~7–24MB
~339K SLoC