Configurator
<oc-auth-field-v1><input type="password" id="af-cfg" minlength="8" aria-describedby="af-cfg-hint" aria-required="true"><label for="af-cfg">Passwort</label><div slot="hint" id="af-cfg-hint">Mindestens 8 Zeichen.</div></oc-auth-field-v1>Usage
Anatomy
- Container
- Label
- Input (masked)
- Visibility toggle
- Hint
- Counter
HTML
<div class="anatomy" style="display:block;max-width:360px;margin:28px auto">
<oc-auth-field-v1 show-counter><input type="password" id="af-an" minlength="8" maxlength="20" value="otto1" aria-describedby="af-an-hint" aria-required="true" autocomplete="new-password"><label for="af-an">Passwort</label><div slot="hint" id="af-an-hint">Mindestens 8 Zeichen.</div></oc-auth-field-v1>
<span class="anatomy-pin" style="left:-16px;top:30%">1</span>
<span class="anatomy-pin" style="left:6%;top:-22px">2</span>
<span class="anatomy-pin" style="left:19%;top:32%">3</span>
<span class="anatomy-pin" style="left:calc(100% + 16px);top:32%">4</span>
<span class="anatomy-pin" style="left:-16px;top:88%">5</span>
<span class="anatomy-pin" style="left:calc(100% + 16px);top:88%">6</span>
<ol class="anatomy-key"><li data-n="1">Container</li><li data-n="2">Label</li><li data-n="3">Input (masked)</li><li data-n="4">Visibility toggle</li><li data-n="5">Hint</li><li data-n="6">Counter</li></ol>Variants
There are two variants of the auth field:
- default
- error
Default
Error
HTML
<p class="demo-label">Default</p>
<oc-auth-field-v1 show-counter><input type="password" id="af-var-1" minlength="8" aria-describedby="af-var-1-hint" aria-required="true" autocomplete="new-password"><label for="af-var-1">Passwort</label><div slot="hint" id="af-var-1-hint">Mindestens 8 Zeichen.</div></oc-auth-field-v1>
<p class="demo-label">Error</p>
<oc-auth-field-v1 variant="error" show-counter><input type="password" id="af-var-2" minlength="8" aria-describedby="af-var-2-error af-var-2-hint" aria-required="true" aria-invalid="true" autocomplete="new-password"><label for="af-var-2">Passwort</label><div slot="error" id="af-var-2-error">Bitte trage ein gültiges Passwort ein.</div><div slot="hint" id="af-var-2-hint">Mindestens 8 Zeichen.</div></oc-auth-field-v1>
Hint, counter and error
The auth field comes with an optional hint. The hint helps the user filling out the auth field correctly and provides further context. The auth field can also include a counter which can be used for counting the letters and setting minimum or maximum values. The error is shown additionally above the hint if the user made a wrong input. It helps the user understanding the mistake and fixing the input.
Hint
Hint and counter (type to see it count)
Error and hint
HTML
<oc-auth-field-v1><input type="password" id="af-hcv-1" minlength="8" aria-describedby="af-hcv-1-hint" aria-required="true" autocomplete="new-password"><label for="af-hcv-1">Passwort</label><div slot="hint" id="af-hcv-1-hint">Mindestens 8 Zeichen.</div></oc-auth-field-v1>
<oc-auth-field-v1 show-counter><input type="password" id="af-hcv-2" minlength="8" value="otto" aria-describedby="af-hcv-2-hint" aria-required="true" autocomplete="new-password"><label for="af-hcv-2">Passwort</label><div slot="hint" id="af-hcv-2-hint">Mindestens 8 Zeichen.</div></oc-auth-field-v1>
<oc-auth-field-v1 variant="error"><input type="password" id="af-hcv-3" minlength="8" aria-describedby="af-hcv-3-error af-hcv-3-hint" aria-required="true" aria-invalid="true" autocomplete="new-password"><label for="af-hcv-3">Passwort</label><div slot="error" id="af-hcv-3-error">Bitte trage ein gültiges Passwort ein.</div><div slot="hint" id="af-hcv-3-hint">Mindestens 8 Zeichen.</div></oc-auth-field-v1>
Behavior
States
Enabled (hover, focus, type)
Filled
HTML
<p class="demo-label">Enabled (hover, focus, type)</p>
<oc-auth-field-v1><input type="password" id="af-st-1" aria-describedby="af-st-1-hint" aria-required="true" autocomplete="current-password"><label for="af-st-1">Passwort</label><div slot="hint" id="af-st-1-hint">Hinweis</div></oc-auth-field-v1>
<p class="demo-label">Filled</p>
<oc-auth-field-v1><input type="password" id="af-st-2" value="geheim" aria-describedby="af-st-2-hint" aria-required="true" autocomplete="current-password"><label for="af-st-2">Passwort</label><div slot="hint" id="af-st-2-hint">Hinweis</div></oc-auth-field-v1>
Interaction
When the user fills in the input, the label moves to the top left and the input is displayed in the container. The user can reveal or mask the password input by tapping the visibility toggle. The input should be masked by default.
Empty: the label sits inside the field
→ filling out input: the label moves to the border
HTML
<p class="demo-label">Empty: the label sits inside the field</p>
<oc-auth-field-v1><input type="password" id="af-in-1" aria-describedby="af-in-1-hint" aria-required="true" autocomplete="new-password"><label for="af-in-1">Passwort</label><div slot="hint" id="af-in-1-hint">Mindestens 8 Zeichen.</div></oc-auth-field-v1>
<p class="demo-label">→ filling out input: the label moves to the border</p>
<oc-auth-field-v1><input type="password" id="af-in-2" value="otto1" aria-describedby="af-in-2-hint" aria-required="true" autocomplete="new-password"><label for="af-in-2">Passwort</label><div slot="hint" id="af-in-2-hint">Mindestens 8 Zeichen.</div></oc-auth-field-v1>
Hidden (tap "Anzeigen")
↕ Visible (tap "Ausblenden")
HTML
<oc-auth-field-v1><input type="password" id="af-vis-1" value="Sommer2026" aria-describedby="af-vis-1-hint" aria-required="true" autocomplete="new-password"><label for="af-vis-1">Passwort</label><div slot="hint" id="af-vis-1-hint">Mindestens 8 Zeichen.</div></oc-auth-field-v1>
<oc-auth-field-v1 password-visible><input type="password" id="af-vis-2" value="Sommer2026" aria-describedby="af-vis-2-hint" aria-required="true" autocomplete="new-password"><label for="af-vis-2">Passwort</label><div slot="hint" id="af-vis-2-hint">Mindestens 8 Zeichen.</div></oc-auth-field-v1>
Fitting
You can adjust the width of the auth field according to your needs or set it to fill-parent. The height of the container is fixed to 48px. The height of the auth field is set to fit-content and changes when the hint and error are visible.
Custom width
Fills the parent
HTML
<div class="narrow" style="width:100%;margin:0 auto"><oc-auth-field-v1><input type="email" id="af-fit-1" aria-describedby="af-fit-1-hint" aria-required="true" autocomplete="email" spellcheck="false"><label for="af-fit-1">E-Mail-Adresse</label><div slot="hint" id="af-fit-1-hint">Hinweis</div></oc-auth-field-v1></div>
<oc-auth-field-v1><input type="email" id="af-fit-2" aria-describedby="af-fit-2-hint" aria-required="true" autocomplete="email" spellcheck="false"><label for="af-fit-2">E-Mail-Adresse</label><div slot="hint" id="af-fit-2-hint">Hinweis</div></oc-auth-field-v1>
Placement
You can place auth fields and text fields side by side. When placing them horizontally, make sure there is an 8px gap between them. Vertically, there should be a 24px gap.
Side by side, 8px gap
HTML
<p class="demo-label">Side by side, 8px gap</p>
<oc-form-group-v1 orientation="horizontal" flex-behavior="grow" gap="var(--oc-base-dimension-8)" oc-aria-label="Passwort festlegen">
<oc-auth-field-v1><input type="password" id="af-h-1" aria-describedby="af-h-1-hint" aria-required="true" autocomplete="new-password"><label for="af-h-1">Passwort</label><div slot="hint" id="af-h-1-hint">Mindestens 8 Zeichen.</div></oc-auth-field-v1>
<oc-auth-field-v1><input type="password" id="af-h-2" aria-describedby="af-h-2-hint" aria-required="true" autocomplete="new-password"><label for="af-h-2">Passwort wiederholen</label><div slot="hint" id="af-h-2-hint">Gib dein Passwort noch einmal ein.</div></oc-auth-field-v1>
</oc-form-group-v1>
Stacked, 24px gap
HTML
<p class="demo-label">Stacked, 24px gap</p>
<oc-form-group-v1 orientation="vertical" gap="var(--oc-base-dimension-24)" oc-aria-label="Konto anlegen">
<oc-auth-field-v1><input type="email" id="af-v-1" aria-describedby="af-v-1-hint" aria-required="true" autocomplete="email" spellcheck="false"><label for="af-v-1">E-Mail-Adresse</label><div slot="hint" id="af-v-1-hint">Wir schicken dir eine Bestätigung.</div></oc-auth-field-v1>
<oc-auth-field-v1><input type="password" id="af-v-2" aria-describedby="af-v-2-hint" aria-required="true" autocomplete="new-password"><label for="af-v-2">Passwort</label><div slot="hint" id="af-v-2-hint">Mindestens 8 Zeichen.</div></oc-auth-field-v1>
<oc-auth-field-v1><input type="password" id="af-v-3" aria-describedby="af-v-3-hint" aria-required="true" autocomplete="new-password"><label for="af-v-3">Passwort wiederholen</label><div slot="hint" id="af-v-3-hint">Gib dein Passwort noch einmal ein.</div></oc-auth-field-v1>
</oc-form-group-v1>
Best practices
Content guidelines
Accessibility
Implementation
Live demo
Anmelden
Schön, dass du wieder da bist.
Neu bei OTTO?
HTML
<div style="max-width:400px;margin:0 auto;display:grid;gap:24px">
<div style="display:grid;gap:4px">
<p class="oc-headline-100">Anmelden</p>
<p class="oc-copy-100 oc-text-color-secondary">Schön, dass du wieder da bist.</p>
<oc-form-group-v1 orientation="vertical" gap="var(--oc-base-dimension-24)" oc-aria-label="Anmeldedaten">
<oc-auth-field-v1><input type="email" id="af-demo-1" value="lara.lavendel@example.de" aria-required="true" autocomplete="email" spellcheck="false"><label for="af-demo-1">E-Mail-Adresse</label></oc-auth-field-v1>
<oc-auth-field-v1><input type="password" id="af-demo-2" aria-required="true" autocomplete="current-password"><label for="af-demo-2">Passwort</label></oc-auth-field-v1>
</oc-form-group-v1>
<oc-checkbox-v2 width-behavior="fit" size="50"><input type="checkbox" checked aria-label="oc-auto"><label slot="label">Angemeldet bleiben</label></oc-checkbox-v2>
<oc-link-v2 size="75"><a href="#">Passwort vergessen?</a></oc-link-v2>
<oc-button-v1 variant="primary">Anmelden</oc-button-v1>
<oc-divider-v1></oc-divider-v1>
<div style="display:grid;gap:12px">
<p class="oc-copy-100"><b>Neu bei OTTO?</b></p>
<oc-button-v1 variant="secondary">Kundenkonto erstellen</oc-button-v1>