Email Field
Usage
Email Field is a form input for entering a single email address. Use it when the value should be an email address and browser email keyboards, autofill, or native validation improve the input flow, such as account settings, contact forms, invitations, or other flows that store one address.
import { MtEmailField } from "@shopware-ag/meteor-component-library";
Examples
Disabled
Error
Hint
API reference
Props
| Prop | Type | Default |
|---|---|---|
disabled | boolean | |
required | boolean | |
model-value | string | |
name | string | |
label | string | |
error | { detail: string; } | |
help-text | string | |
copyable | boolean | |
copyable-tooltip | boolean | |
placeholder | string | |
small | boolean | |
is-inherited | boolean | |
is-inheritance-field | boolean |
Events
| Event | Payload |
|---|---|
update:modelValue | [value: string | undefined] |
Slots
| Slot | Bindings |
|---|---|
prefix | {} |
suffix | {} |
hint | {} |
Best practices
Do
- Use a clear label such as
Email addressorWork email. - Add help text when users need context about how the address will be used.
- Use the shared field features such as
error,hint, or inheritance only when they add real value.
Don't
- Do not use Email Field for general text input.
- Do not rely on the placeholder as the only label.
- Do not use it for multiple addresses in one field.
Behavior
- Email Field uses a native
type="email"input and checks browser validity on blur. copyableadds a copy button for read-only or reference-heavy flows where copying the address is useful.- The component supports shared field patterns such as
prefix,suffix,hint,helpText,error, and inheritance handling.
Accessibility
- Always provide a visible label so users understand what address is expected.
- Native email input behavior can improve keyboard and autofill support, especially on mobile devices.
Related components
- Text Field: when the value is general text and should not be constrained to an email format.