Skip to main content
Vuetify0 is now in alpha!
Vuetify0 Logo
Theme
Mode
Palettes
Accessibility
Vuetify One
Sign in to Vuetify One

Access premium tools across the Vuetify ecosystem — Bin, Play, Studio, and more.

Not a subscriber? See what's included

Form

A form wrapper that coordinates validation across child input fields and handles submit/reset events.


Renders elementIntermediateApr 5, 2026

Usage

Wrap your inputs in <Form>. Native <button type="submit"> and <button type="reset"> work as expected.

Form with Validation

Email and password fields with validation rules, submit/reset buttons, and success feedback on completion.

Anatomy

vue
<script setup lang="ts">
  import { Form, Input } from '@vuetify/v0'
</script>

<template>
  <Form>
    <Input.Root>
      <Input.Control />
      <Input.Error />
    </Input.Root>
  </Form>
</template>

Architecture

Form creates a createForm instance and provides it via useForm(). Child validations auto-register on mount and unregister on unmount.

Form Architecture

Use controls to zoom and pan. Click outside or press Escape to close.

Form Architecture

The @submit event is pass-through — it always fires, regardless of validity. Guard in your handler:

ts
function onSubmit ({ valid }: { valid: boolean }) {
  if (!valid) return
  // handle submission
}

Recipes

Slot Props

Use slot props for reactive form state in the template:

vue
<template>
  <Form v-slot="{ isValid, isValidating, submit, reset }">
    <!-- Inputs -->

    <button type="submit" :disabled="isValidating">
      {{ isValidating ? 'Validating…' : 'Submit' }}
    </button>

    <p v-if="isValid === false">Please fix the errors above.</p>
  </Form>
</template>

Disabled / Readonly

The disabled and readonly props propagate to the form context. Child components can read them via useForm():

vue
<template>
  <Form disabled>
    <!-- All fields read form.disabled via useForm() -->
  </Form>
</template>

Custom Namespace

Use namespace to isolate multiple forms on the same page:

vue
<template>
  <Form namespace="billing">
    <!-- useForm('billing') resolves this form -->
  </Form>

  <Form namespace="shipping">
    <!-- useForm('shipping') resolves this form -->
  </Form>
</template>

Programmatic Submit

Call submit() from slot props when you need to trigger validation without a submit button:

vue
<template>
  <Form v-slot="{ submit }">
    <!-- Inputs -->

    <button type="button" @click="submit">Save Draft</button>
  </Form>
</template>
Tip

Calling submit() or reset() via slot props invokes the form methods directly and does not emit @submit or @reset. Those events only fire from native form submission/reset.

Accessibility

Form renders a native <form> element, so all standard form semantics apply. No custom ARIA is needed — the browser handles submit on Enter, associates labels with inputs via id/for, and reports validation errors to assistive technology through child inputs.

Keyboard Interaction

KeyBehavior
Enter (in input)Submits the form
EscapeNo default behavior — handle in your submit handler

API Reference

The following API details are for all variations of the Form component.

Form

Props

namespace

string | undefined

Namespace for dependency injection

Default: "v0:form"

disabled

boolean | undefined

Disables all registered fields

Default: false

readonly

boolean | undefined

Sets all registered fields to readonly

Default: false

modelValue

boolean | null | undefined

Default: null

Events

update:model-value

[value: boolean | null]

submit

[payload: { valid: boolean; }]

Slots

default

FormSlotProps
Was this page helpful?

© 2016-1970 Vuetify, LLC
Ctrl+/