MtEmailField component is a specialized text input for email addresses with built-in validation and optional copy functionality.
Import
Props
v-model binding for the email field value.
A label for the email field.
The name attribute for the input element.
Placeholder text displayed when the field is empty.
Disables the email field.
Marks the field as required.
Renders the field in a smaller size.
Adds a copy button to copy the email address to clipboard.
Help text with additional information.
Error object with a
detail property for validation messages.Indicates if the value is inherited.
Enables inheritance functionality.
Events
Emitted when the email value changes.
Emitted when the input loses focus.
Emitted when the field gains focus.
Emitted when the field loses focus.
Emitted when inheritance is restored.
Emitted when inheritance is removed.
Slots
Content displayed before the input.
Content displayed after the input (not shown if copyable is true).
Additional hint content below the field.
Usage
Basic Email Field
With Validation
Copyable Email
Small Size
With Prefix Icon
Accessibility
- Uses native email input type for browser validation
- Label properly associated with input
- Error messages linked via aria-describedby
- Invalid state communicated via aria-invalid
- Copy button has descriptive aria-label
- Disabled state prevents interaction