uiform

package
v0.7.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 2, 2026 License: MIT Imports: 5 Imported by: 0

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

func New(groups ...*huh.Group) *huh.Form

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

func PromptYN(ctx context.Context, question string, def bool) (bool, error)

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

func Theme() huh.Theme

Theme returns Entire's standard huh theme.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL