Component
Vue Email Input Component
<DomEmailInput>A convention text field for email addresses with email type, autocomplete, and an email validator.
Playground
Try every prop live
Email input playground
Adjust the props to explore sizing, content, and behaviour.
Properties
Control props
Visible field label.
Placeholder text shown before entry.
Native autocomplete hint.
Field props
Current field value.
Optional ID override. By default parent forms derive the input ID from the field path using underscores.
Local field name. Parent forms derive the full field path and native HTML name from the form hierarchy.
Optional helper copy below the field.
Validation errors for this field.
Validators
No validators yet.
Validators attached to this field. Use functions in Vue code, or serializable records such as { name: "minLength", props: { min: 2 } } in generated schemas.
Render default field chrome, or hide chrome while keeping form state wiring.
npm install @getdom/studio<script setup>
import '@getdom/studio/style.css';
import { reactive } from 'vue';
import { DomEmailInput } from '@getdom/studio';
const data = reactive({
"modelValue": "",
"id": "",
"name": "",
"label": "Email address",
"description": "",
"placeholder": "you@example.com",
"required": false,
"disabled": false,
"readOnly": false,
"invalid": false,
"errors": [],
"visible": true,
"validators": [],
"validateOnBlur": true,
"chrome": "field",
"autocomplete": "email"
});
</script>
<template>
<DomEmailInput
v-bind="data"
@update:modelValue="data.modelValue = $event"
/>
</template>Reference
Props
Control props
| Name | Type | TS | Default | Description |
|---|---|---|---|---|
label | string | string | 'Email address' | Visible field label. |
placeholder | string | string | 'you@example.com' | Placeholder text shown before entry. |
autocomplete | string | string | 'email' | Native autocomplete hint. |
Field props
| Name | Type | TS | Default | Description |
|---|---|---|---|---|
modelValue | any | any | '' | Current field value. |
id | string | string | '' | Optional ID override. By default parent forms derive the input ID from the field path using underscores. |
name | string | string | '' | Local field name. Parent forms derive the full field path and native HTML name from the form hierarchy. |
description | string | string | '' | Optional helper copy below the field. |
required | boolean | boolean | false | Mark the field as required. |
disabled | boolean | boolean | false | Disable field interaction. |
readOnly | boolean | boolean | false | Show the value but prevent editing. |
invalid | boolean | boolean | false | Mark the field invalid. |
errorsts | array | object | string | Array< | [] | Validation errors for this field. |
visible | boolean | boolean | true | Show or hide the field. |
validators | array | Array<unknown> | [] | Validators attached to this field. Use functions in Vue code, or serializable records such as { name: "minLength", props: { min: 2 } } in generated schemas. |
validateOnBlur | boolean | boolean | true | Run validators when the field loses focus. |
chrome | 'field' | 'none' | false | string | 'field' | Render default field chrome, or hide chrome while keeping form state wiring. |
Auto-generated from Email input.props and inline _edit hints.
Events
| Name | Payload | Description |
|---|---|---|
| @update:modelValue | string | Fired when the email address changes. |
| @focus | FocusEvent | Fired when the input receives focus. |
| @blur | FocusEvent | Fired when the input loses focus. |
Names auto-detected from defineEmits and source emit() calls; payload and description from __doc.events when present.