Skip to main content

Module render

Module render 

Source
Expand description

Shared choice/frame rendering for both line-driven and key-driven prompts.

One place builds the styled strings a prompt shows, so the numbered list a LineTerminal prints and the live frame a RichTerminal redraws stay visually consistent. Rendering only builds strings — writing and cursor movement are the terminal’s job — so these helpers are pure and unit-testable.

Structs§

Style
Styling context shared by every rendered frame: color Palette and the resolved Glyphs set.

Functions§

frame_rows
Build the live frame a key-driven terminal redraws as focus and selection change.
heading
The bold heading line shown above a prompt’s choices or input.
key_hint
The trailing, dimmed key-hint line for a key-driven frame.
numbered_rows
Build the static, numbered choice list a line-driven terminal prints once.