Documentation
¶
Overview ¶
Package textprompt provides a single-line text-input overlay for the tui/app shell — the third of the overlay kits next to prompt (buttons) and picker (filterable list).
The overlay closes itself and emits a ResultMsg; the hosting Content matches on Key to tell prompts apart:
case textprompt.ResultMsg:
if field, ok := msg.Key.(configField); ok { ... }
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct {
// Key is echoed in ResultMsg so apps with several prompts can tell
// results apart.
Key any
Title string
// Help is dimmed explanatory text under the title.
Help string
// Value pre-fills the input.
Value string
// Placeholder defaults to Title.
Placeholder string
// Secret masks the typed value (password-style echo).
Secret bool
// CharLimit bounds the input length (default 128).
CharLimit int
// MaxWidth bounds the modal (default 70).
MaxWidth int
}
Options configure New.
Click to show internal directories.
Click to hide internal directories.