← All Components
<mth-auth-form>
Authentication form supporting sign-in, sign-up, password reset, and magic-link modes with autofill-compatible autocomplete, FormControlController validation, and alert error display.
When NOT to use: Use a lightweight @methane-ui/css layout class instead of a custom element when static CSS suffices.
Live Interactive Preview
Ready · interact with <mth-auth-form>, or toggle Theme, Direction (LTR/RTL), or props above.
Multi-Framework Playground & Snippets
<script type="module" src="@methane-ui/auth/auth-form"></script>
<mth-auth-form mode="signin" required></mth-auth-form>import '@methane-ui/auth/auth-form';
import '@methane-ui/react';
export function Example() {
return <mth-auth-form mode="signin" required></mth-auth-form>;
}<script setup lang="ts">
import '@methane-ui/auth/auth-form';
</script>
<template>
<mth-auth-form mode="signin" required></mth-auth-form>
</template>import { Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import '@methane-ui/auth/auth-form';
import { MthAuthFormDirective } from '@methane-ui/angular';
@Component({
standalone: true,
schemas: [CUSTOM_ELEMENTS_SCHEMA],
imports: [MthAuthFormDirective],
template: `<mth-auth-form mode="signin" required></mth-auth-form>`,
})
export class ExampleComponent {}<script lang="ts">
import '@methane-ui/auth/auth-form';
import MthAuthForm from '@methane-ui/svelte/MthAuthForm.svelte';
</script>
<MthAuthForm mode="signin" required></MthAuthForm>Properties & Attributes
| Property | Attribute | Type | Default | Description |
|---|---|---|---|---|
mode | mode | 'signin' | 'signup' | 'reset' | 'magic-link' | "signin" | Form flow mode (signin | signup | reset | magic-link). |
value | value | string | "" | Form-associated primary email value. |
name | name | string | "" | Form field name submitted via ElementInternals. |
email | email | string | "" | Bound email input value. |
password | password | string | "" | Bound password input value. |
fullName | full-name | string | "" | Full name value displayed in signup mode. |
error | error | string | "" | External authentication error message shown in <mth-alert>. |
loading | loading | boolean | false | Disables controls and shows loading state on submit. |
disabled | disabled | boolean | false | Disables all form controls. |
required | required | boolean | true | Marks email (and password when applicable) as required. |
submitLabel | submit-label | string | "" | Optional custom submit button label. |
Events
| Event | Detail Type | Description |
|---|---|---|
mth-submit | { mode: string; email: string; password: string; fullName: string } | Cancelable submit event emitted when client validation passes. |
mth-change | { email: string; password: string; fullName: string } | Fired when any credential field changes. |
Accessibility Checklist
| Category | Requirement | Verified By |
|---|---|---|
| aria | All aria-* IDREFs resolve within the same DOM root (ADR-003). | scanSameRootAria |
| focus | delegatesFocus: true with zero host internals.role (ADR-014). | lint-plugin & spec-compiler |
| contrast | Renders legible borders, focus outlines, and selection indicators under forced-colors: active. | Playwright forced-colors matrix |
| states | Exposes ElementInternals CustomStateSet flags: :state(disabled), :state(invalid), :state(loading), :state(dirty), :state(touched). | Conformance suite |
| i18n | Routes 14 UI/ARIA strings through @methane-ui/core i18n catalog. | Locale context test |