Input is a input field. The input field is a field that allows the user to enter text. Use it to user input. It can be used for collecting text, passwords, or other short input. The input field supports Suggestions, Placeholder, and Validation.
| 21 | // |
| 22 | // The input field supports Suggestions, Placeholder, and Validation. |
| 23 | type Input struct { |
| 24 | accessor Accessor[string] |
| 25 | key string |
| 26 | id int |
| 27 | |
| 28 | title Eval[string] |
| 29 | description Eval[string] |
| 30 | placeholder Eval[string] |
| 31 | suggestions Eval[[]string] |
| 32 | |
| 33 | textinput textinput.Model |
| 34 | |
| 35 | inline bool |
| 36 | validate func(string) error |
| 37 | err error |
| 38 | focused bool |
| 39 | |
| 40 | width int |
| 41 | height int |
| 42 | |
| 43 | theme Theme |
| 44 | hasDarkBg bool |
| 45 | keymap InputKeyMap |
| 46 | } |
| 47 | |
| 48 | // NewInput creates a new input field. |
| 49 | // |
nothing calls this directly
no outgoing calls
no test coverage detected