Crates.io | tui-framework-experiment |
lib.rs | tui-framework-experiment |
version | 0.3.0 |
source | src |
created_at | 2024-10-19 16:31:51.261881 |
updated_at | 2024-10-19 16:31:51.261881 |
description | An set of harmonious Ratatui widgets with a goal of building a proper widget framework. |
homepage | |
repository | https://github.com/joshka/tui-framework-experiment |
max_upload_size | |
id | 1415518 |
size | 139,874 |
tui-framework-experiment
is a Rust crate with extra widgets for Ratatui, previously published as
Ratatui-widgets
cargo add tui-framework-experiment
// TODO: Add usage examples
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.
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)),
]);
Most of this list of widgets from https://en.wikipedia.org/wiki/Graphical_widget#List_of_common_generic_widgets
[Submit]
(*) item ( ) item
[x] item
<_ON_ / OFF >
[ON]
[Submit][↓]
[Red]
=> [Green]
=> [Blue]
[------------|---------------]
[123][+][-]
[Selected Item][↓]
[____________][↓]
<go here>
(integrate with OSC 8)Copyright (c) 2024 Josh McKinney
This project is licensed under either of:
at your option.
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.