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

createInput API

API reference for the createInput composable.

Explore these related pages for additional context and usage patterns.

PageCategory
createInputForms
createValidationForms
createFormForms
InputForms

Functions

createInput

(options: InputOptions<T>) => InputContext<T>

Options

value required

Ref<T, T>

Value source — caller owns this ref.

id

ID | undefined

Unique identifier (auto-generated if omitted).

label

string | undefined

Display label.

name

string | undefined

Form field name.

form

string | undefined

Associate with form by ID.

required

boolean | undefined

Whether required.

disabled

MaybeRefOrGetter<boolean> | undefined

Disabled state.

readonly

MaybeRefOrGetter<boolean> | undefined

Readonly state.

rules

(string | FormValidationRule | StandardSchemaV1)[] | undefined

Validation rules.

error

MaybeRefOrGetter<boolean> | undefined

Manual error state override — forces invalid.

errorMessages

MaybeRefOrGetter<MaybeArray<string> | undefined>

Manual error messages — merged with rule-based errors.

dirty

((value: T) => boolean) | undefined

Predicate for "has content".

equals

((a: T, b: T) => boolean) | undefined

Equality check for pristine tracking.

Default: ===

Properties

id

ID

label

string | undefined

name

string | undefined

form

string | undefined

required

boolean | undefined

errorId

string

descriptions

RegistryContext<RegistryTicketInput<unknown>, RegistryTicket<unknown> & RegistryTicketInput<unknown>>

fieldErrors

RegistryContext<RegistryTicketInput<unknown>, RegistryTicket<unknown> & RegistryTicketInput<unknown>>

hasDescription

Readonly<Ref<boolean, boolean>>

hasError

Readonly<Ref<boolean, boolean>>

value

Ref<T, T>

isDirty

Readonly<Ref<boolean, boolean>>

isFocused

ShallowRef<boolean>

isDisabled

Readonly<Ref<boolean, boolean>>

isReadonly

Readonly<Ref<boolean, boolean>>

isPristine

Readonly<Ref<boolean, boolean>>

isTouched

ShallowRef<boolean>

errors

Readonly<Ref<string[], string[]>>

isValid

Readonly<Ref<boolean | null, boolean | null>>

isValidating

Readonly<Ref<boolean, boolean>>

state

Readonly<Ref<InputState, InputState>>

Methods

validate

() => Promise<boolean>

reset

() => void
Was this page helpful?

Ctrl+/