Skip to content

Forms & Input

Pass the current value into text_input / text_area and write edits from on_input.

#Text input

text_input(self.name.as_str())
    .placeholder("Name")
    .on_input(edit)
text_area(self.notes.as_str())
    .on_input(edit_notes)

#Fields

Field and Fieldset connect labels, descriptions, controls, and errors. Validation lives on FieldState.

#Choices

Compose Checkbox, CheckboxGroup, RadioGroup, Radio, and Switch with their indicators and labels. Store checked values on the view and update them from listeners.

#Select

SelectState, ComboboxState, and AutocompleteState hold the current value and options. Keep option values stable.

#Events

Input listeners receive the next text. Register pointer, key, and submit handlers on ViewContext.