Basic Form
Simple form with fields
With Validation
Form with validation rules
Form element with method, action and native validation you can switch off.
Default usage you can copy and adapt.
Simple form with fields
Form with validation rules
The props you are most likely to need, with types and defaults.
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| method | 'get' | 'post' | No | post | Form method. |
| action | string | No | — | Form action. |
| novalidate | boolean | No | false | Skip the browser's own validation. |
| onsubmit | (event: SubmitEvent) => void | No | — | Runs on submit. |