Form
Validates its fields on submit, against their own rules or one Standard Schema such as Zod 4, hands over their values, and shows server errors on the field they name.
Parts
| Part | File | Does |
|---|---|---|
| Form | Form.vue | Validates its fields on submit, hands over their values, and shows server errors on the field they name. |
Styling
All of Form’s styles live in form.json. New to styling in Frontic UI? How styling works →
Install
- Installs with it
- field
- npm packages
- @standard-schema/spec
- @vueuse/core
- reka-ui
Built from
API reference
Validates its fields on submit, hands over their values, and shows server errors on the field they name. Renders a <form>.
Props 6
| Prop | Type | Default | |
|---|---|---|---|
| errors | Record<string, string | string[]> | — | |
| |||
| validationMode | FieldValidationMode | 'onSubmit' | |
| |||
| asChild | boolean | false | |
| |||
| as | AsTag | Component | 'form' | |
| |||
| class | ClassValue | — | |
| |||
| schema | StandardSchema | — | |
| |||
Events 2
| Event | Payload | |
|---|---|---|
| submit | event: SubmitEvent | |
| ||
| formSubmit | values: Record<string, unknown>, event: SubmitEvent | |
| ||
Slots 1
| Slot | Slot props | |
|---|---|---|
| default | { errors: string[]; } | |
| ||