Documentation
¶
Overview ¶
Package form is the pkg/form showcase: a two-step sign-up wizard holding every field kind on one card.
Account Text with a format rule, Password with a length rule, both
required and each with a note saying what it is for
Profile a Select that must be picked (it chooses on arrival), a
MultiSelect that needs at least one, a TextArea, and a Confirm
Enter moves down and, on a step's last field, on to the next step; esc goes back a step. Submitting replaces the form with what it submitted. A theme swap keeps every answer, the step and the focus (rule 4).
Index ¶
- func New(t theme.Theme) screen.Screen
- type Screen
- func (s *Screen) Help() []key.Binding
- func (s *Screen) HelpSections() []help.Section
- func (s *Screen) Init() tea.Cmd
- func (s *Screen) IsCapturingKeys() bool
- func (s *Screen) Layout() layout.Node
- func (s *Screen) OnEnter(any) tea.Cmd
- func (s *Screen) SetTheme(t theme.Theme)
- func (s *Screen) Title() string
- func (s *Screen) Update(msg tea.Msg) (screen.Screen, tea.Cmd)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Screen ¶
type Screen struct {
// contains filtered or unexported fields
}