Expand description
tui-kit — reusable TUI theme, widget frames, and layout helpers.
Built on top of ratatui. Designed to be shared across multiple terminal-UI projects that follow the same visual design language.
§Modules
| Module | Contents |
|---|---|
theme | Theme struct — the full color/style palette |
block | block::panel_block, block::popup_block, block::widget_title, block::focusable_block |
footer | render_footer, render_footer_with_app, keybind_spans — keybind bar |
tabs | tabs::tab_line — horizontal tab-bar line for block titles |
popup | popup::centered_popup — centered overlay area + Clear |
leader | render_leader_bar — vim-style leader key popup |
mouse | mouse_hit — hit-test a click against a widget [Rect] |
toast | render_toasts — stacked notification toasts |
list | list::render_list — scrollable focusable list |
form | render_form — multi-field input form |
kv | kv::render_kv_table — two-column key/value table |
§Keybind bar convention
Every project should show a footer keybind bar using render_footer.
The visual format is identical across all projects:
Navigate: j/k | Open: Enter | Leader: space | Quit: qKeys are styled with Theme::shortcut_key (yellow), actions and
separators with Theme::hint (dark gray).
Build pairs contextually based on the active UI layer (popup vs main screen):
let mut pairs: Vec<(&str, &str)> = Vec::new();
if some_popup_open {
pairs.push(("Esc", "close"));
pairs.push(("Enter", "confirm"));
} else {
pairs.push(("j/k", "navigate"));
pairs.push(("space", "leader"));
pairs.push(("q", "quit"));
}
render_footer(f, footer_area, &pairs, &theme);Re-exports§
pub use block::render_scrollbar;pub use footer::keybind_spans;pub use mouse::list_item_at;pub use mouse::mouse_hit;pub use mouse::paragraph_line_at;pub use form::FieldInput;pub use form::FormEvent;pub use form::FormField;pub use form::FormState;pub use form::render_form;pub use kv::KvRow;pub use leader::LeaderNode;pub use leader::LeaderResult;pub use leader::LeaderState;pub use leader::render_leader_bar;pub use list::ListItem;pub use list::ListState;pub use log::LogEntry;pub use log::LogLevel;pub use picker::PickerItem;pub use picker::PickerState;pub use picker::render_picker;pub use theme::Theme;pub use toast::Toast;pub use toast::ToastLevel;pub use toast::render_toasts;pub use wizard::ArrayEditSession;pub use wizard::ArrayState;pub use wizard::WizardEvent;pub use wizard::WizardStep;pub use wizard::WizardStepKind;pub use wizard::WizardState;pub use wizard::render_wizard;
Modules§
- block
- footer
- Footer / keybind bar widget.
- form
- kv
- leader
- Vim-style leader key bar — generic, reusable across apps.
- list
- log
- mouse
- Mouse event helpers.
- picker
- Telescope-style two-column picker widget.
- popup
- tabs
- theme
- toast
- wizard
- Step-by-step wizard widget with tree-structured steps, optional steps, select (cycling) steps, and variable-length array steps.