mirror of
https://github.com/anotherhadi/ilovetui.git
synced 2026-08-21 03:55:48 +02:00
21b574eb6f
Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
705 B
705 B
helpbar
A responsive help bar: one line of key bindings that expands, on toggle, into a multi-column view reflowed to use as many columns as the available width allows.
- Bindings render in order: the
WithTogglebinding first, thenWithGlobalbindings (set once), then contextual bindings passed toViewat render time. - Disabled bindings (
key.Binding.SetEnabled(false)) are dropped before layout, so the reflow never budgets width for something that won't be drawn. Height(contextual...)always matcheslipgloss.HeightofViewfor the same arguments, so a host can reserve exactly the right amount of space. An empty bar renders""and takes 0 rows.
See examples/helpbar.