Documentation
¶
Overview ¶
Package uiform builds huh forms wired to Entire's standard theme and accessibility behavior. Centralises the Theme()+WithAccessible() recipe so picker UI stays consistent across callers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsAccessibleMode ¶
func IsAccessibleMode() bool
IsAccessibleMode reports whether accessibility mode is enabled via the ACCESSIBLE environment variable. Set ACCESSIBLE=1 (or any non-empty value) to enable simpler prompts that work better with screen readers.
func New ¶
New creates a huh form with the standard theme, switching to accessible mode when ACCESSIBLE is set. WithAccessible is only available on forms (not individual fields), so wrap confirmations and other prompts in a form to opt into accessibility.
func PromptYN ¶
PromptYN renders a Confirm form with the standard theme/accessibility behavior and returns the user's answer. On user cancellation (Ctrl+C or context.Canceled) returns (false, nil) so callers treat it as a "no"; on real form errors the error is returned wrapped.
func Theme ¶
Theme returns Entire's standard huh theme: base16 (ANSI 0–15) colors so form prompts respect the user's terminal palette and stay consistent with the rest of the CLI's styling. Derived from huh.ThemeBase16 with a few overrides — magenta selection (pointer + chosen options); titles and unselected options use the terminal's default foreground so they invert with the background (dark text on light, light text on dark) like the checkbox bracket does.
Types ¶
This section is empty.