Form Builder Components
| Component | Description |
|---|---|
forms.TextInput(name) | Text, email, password, tel, numeric with live debouncing and validation |
forms.Textarea(name) | Multi-line text with configurable rows and character count |
forms.Select(name) | Dropdown options with searchability and multi-select |
forms.Toggle(name) | Boolean toggle switch |
forms.DatePicker(name) | Date and datetime-local picker |
forms.FileUpload(name) | Local disk or S3/MinIO file and image upload |
forms.ColorPicker(name) | Visual color picker with hex swatches |
forms.TagsInput(name) | Chip and tag management |
forms.Grid(cols) | Responsive multi-column layout grid |
forms.Section(title) | Bordered card section with collapsible support |
forms.Tabs(...) | Tabbed form schemas |
Live Reactive Fields (.Live())#
Form components update state reactively via HTMX micro-swaps:
forms.TextInput("slug").Disabled(),
forms.TextInput("title").
Live(forms.Debounce(300 * time.Millisecond)).
AfterStateUpdated(func(state any, form *forms.Form) {
form.GetField("slug").SetValue(slugify(state.(string)))
})