module Tui::Menu

Overview

Shared rendering for interactive list menus: a selectable item row and the "key → action" footer shown beneath them.

Extended Modules

Defined in:

tui/menu.cr

Instance Method Summary

Instance Method Detail

def footer(keys : Hash(String, String), key_color : String, hint_color : String) : String #

Renders a footer like "↑/↓ move ↵ select q quit" from an ordered keys hash of key-label => action description.


def line(label : String, hint : String, selected : Bool, key_color : String, value_color : String, selected_color : String, hint_color : String, badge : String | Nil = nil, badge_color : String | Nil = nil) : String #

Renders one selectable row: a cursor marker, the label, an optional colored badge (e.g. "✓ Current"), and a dim hint trailing it.