API Reference
Props mirror Base UI React where applicable, adapted for Svelte 5. Native HTML attributes for the rendered element are also accepted unless noted.
Form
A native form element with consolidated error handling. Renders a <form> element.
Props
errors FormErrors —
- Name
errors- Description
Validation errors returned externally, typically after submission by a server or a form action. This should be an object where keys correspond to the
nameattribute on<Field.Root>, and values correspond to error(s) related to that field.- Type
FormErrors | undefined
onFormSubmit function —
- Name
onFormSubmit- Description
Event handler called when the form is submitted.
preventDefault()is called on the native submit event when used.- Type
((formData: FormData, event: SubmitEvent) => void) | undefined