Documentation ¶
Index ¶
- Variables
- type EchoMode
- type InputMode
- type KeyMap
- type Model
- func (m Model) Data() string
- func (m Model) DataString() string
- func (m Model) Error() error
- func (m Model) Init() tea.Cmd
- func (m Model) Quitting() bool
- func (m Model) TeaProgramOpts() []tea.ProgramOption
- func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (m Model) View() string
- func (m *Model) WithEchoMode(mode EchoMode) *Model
- func (m *Model) WithInputMode(mode InputMode) *Model
- func (m *Model) WithValidateFunc(vf ValidateFunc) *Model
- type Option
- type ValidateFunc
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultKeyMap = KeyMap{ Confirm: key.NewBinding( key.WithKeys("enter"), key.WithHelp("enter", "confirm"), ), Quit: key.NewBinding( key.WithKeys("esc", "ctrl+c"), key.WithHelp("esc", "quit"), ), }
Functions ¶
This section is empty.
Types ¶
type EchoMode ¶
const ( // EchoNormal displays text as is. This is the default behavior. EchoNormal EchoMode = textinput.EchoNormal // EchoPassword displays the EchoCharacter mask instead of actual // characters. This is commonly used for password fields. EchoPassword EchoMode = textinput.EchoPassword // EchoNone displays nothing as characters are entered. This is commonly // seen for password fields on the command line. EchoNone EchoMode = textinput.EchoNone )
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
func (Model) DataString ¶
func (Model) TeaProgramOpts ¶ added in v0.8.4
func (m Model) TeaProgramOpts() []tea.ProgramOption
func (*Model) WithEchoMode ¶
func (*Model) WithInputMode ¶
func (*Model) WithValidateFunc ¶
func (m *Model) WithValidateFunc(vf ValidateFunc) *Model
type Option ¶
type Option func(*Model)
func WithEchoMode ¶
func WithInputMode ¶
func WithKeyMap ¶ added in v0.8.1
func WithTeaProgramOpts ¶ added in v0.8.4
func WithTeaProgramOpts(opts ...tea.ProgramOption) Option
func WithValidateFunc ¶
func WithValidateFunc(vf ValidateFunc) Option
type ValidateFunc ¶
Click to show internal directories.
Click to hide internal directories.