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

<mth-passkey-prompt>

@methane-ui/auth~6.8 KB brotli (kit + Lit)~1.4 KB marginal

WebAuthn passkey registration and sign-in prompt with PublicKeyCredential feature detection and fallback trigger.

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-passkey-prompt> (@methane-ui/auth)
Ready · interact with <mth-passkey-prompt>, or toggle Theme, Direction (LTR/RTL), or props above.

Multi-Framework Playground & Snippets

<script type="module" src="@methane-ui/auth/passkey-prompt"></script>
<mth-passkey-prompt mode="signin" status="idle"></mth-passkey-prompt>

Properties & Attributes

PropertyAttributeTypeDefaultDescription
modemode'signin' | 'register'"signin"Whether authenticating with an existing passkey or enrolling a new one.
statusstatus'idle' | 'pending' | 'success' | 'error' | 'unsupported'"idle"Current WebAuthn prompt lifecycle state.
usernameusernamestring""Optional user identifier associated with the passkey prompt.
errorerrorstring""Explicit failure message displayed to the user.
disableddisabledbooleanfalseDisables trigger and fallback controls.
conditionalconditionalbooleantrueWhether to check WebAuthn conditional mediation support.
allowFallbackallow-fallbackbooleantrueDisplays the alternate authentication method button.

Events

EventDetail TypeDescription
mth-passkey-auth{ mode: string; username: string; conditionalSupported: boolean }Emitted when the user initiates WebAuthn passkey verification or registration.
mth-fallback{ mode: string; reason: string }Emitted when the user selects another sign-in method.

Accessibility Checklist

CategoryRequirementVerified By
ariaAll aria-* IDREFs resolve within the same DOM root (ADR-003).scanSameRootAria
focusFocus ownership matches focusModel="host".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).Conformance suite
i18nRoutes 12 UI/ARIA strings through @methane-ui/core i18n catalog.Locale context test