Methane@methane-ui/*
CSS LayoutsComponentsSkillsTheme BuilderGitHub
← All Components

<mth-auth-form>

@methane-ui/auth~9.0 KB brotli (kit + Lit)~2.6 KB marginal

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

Interactive StageLive Custom Element · <mth-auth-form> (@methane-ui/auth)
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>

Properties & Attributes

PropertyAttributeTypeDefaultDescription
modemode'signin' | 'signup' | 'reset' | 'magic-link'"signin"Form flow mode (signin | signup | reset | magic-link).
valuevaluestring""Form-associated primary email value.
namenamestring""Form field name submitted via ElementInternals.
emailemailstring""Bound email input value.
passwordpasswordstring""Bound password input value.
fullNamefull-namestring""Full name value displayed in signup mode.
errorerrorstring""External authentication error message shown in <mth-alert>.
loadingloadingbooleanfalseDisables controls and shows loading state on submit.
disableddisabledbooleanfalseDisables all form controls.
requiredrequiredbooleantrueMarks email (and password when applicable) as required.
submitLabelsubmit-labelstring""Optional custom submit button label.

Events

EventDetail TypeDescription
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

CategoryRequirementVerified By
ariaAll aria-* IDREFs resolve within the same DOM root (ADR-003).scanSameRootAria
focusdelegatesFocus: true with zero host internals.role (ADR-014).lint-plugin & spec-compiler
contrastRenders legible borders, focus outlines, and selection indicators under forced-colors: active.Playwright forced-colors matrix
statesExposes ElementInternals CustomStateSet flags: :state(disabled), :state(invalid), :state(loading), :state(dirty), :state(touched).Conformance suite
i18nRoutes 14 UI/ARIA strings through @methane-ui/core i18n catalog.Locale context test