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 |
[tree] |
[tree::render_tree] — foldable hierarchical tree |
[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: q
Keys 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: = Vecnew;
if some_popup_open else
render_footer;