Form
Form
Takes a block
Groups controls; on submit runs when it is submitted, and the page never navigates away.
Form(bind: …, show: …) { … }
Example
state name = ""
Form(bind: form) {
on submit { log(name) }
Input(bind: name, label: "Name").required
Button("Save", type: .submit, disabled: !form.valid).primary
}
Renders with the class wf-form, stable across releases, so a stylesheet may target it.
| Prop | Type | Meaning |
|---|---|---|
| bind: | State |
A handle on the form: |
| show: | .onBlur .onSubmit .live |
When a |
Attribute families: global, aria, data, form. Plus the universal props on every element: animate:, exit:, speed:, class:, ref:.