Shopware Design

Password Field

Source

Usage

Password Field is a masked input for passwords, secrets, or other credential input that can optionally reveal its value when users need to confirm briefly what they typed. Use it in sign-in, account setup, or credential update flows.

import { MtPasswordField } from "@shopware-ag/meteor-component-library";

Examples

Disabled

Error

Hint

API reference

Props

PropTypeDefault
labelstring | nullnull
placeholderstring""
disabledboolean
error{ code: number; detail: string; } | nullnull
hintstring | nullnull
toggablebooleantrue
namestringundefined
requiredbooleanfalse
help-textstring""
size"default" | "small""default"
is-inheritedbooleanfalse
is-inheritance-fieldbooleanfalse
disable-inheritance-togglebooleanfalse
id-suffixstring""
model-valuestring

Events

EventPayload
update:modelValue[value: string | undefined]
change[value: string | undefined]
inheritance-remove[value: unknown]
inheritance-restore[value: unknown]
submit[]

Slots

SlotBindings
prefixany
suffixany
hintany

Best practices

Do
  • Use a clear label such as Password or New password.
  • Add help text or hint content when users need password rules.
  • Keep the visibility toggle enabled when it helps users avoid typing mistakes.
Don't
  • Do not use Password Field for non-sensitive text.
  • Do not rely on placeholder text as the only instruction.
  • Do not hide password requirements if the field enforces them.

Behavior

  • Password Field masks input by default and can reveal the value with the visibility toggle when toggable is enabled.
  • The component supports shared field patterns such as hint, helpText, error, and inheritance handling.
  • It emits submit on Enter, which can help in credential flows.

Accessibility

  • Always provide a visible label so users know what credential is expected.
  • Make sure the show or hide password control has a clear accessible name, especially if the field appears more than once on a page.
  • Text Field: when the value is not sensitive and does not need reveal behavior.