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

<mth-address-input>

@methane-ui/ui~10.1 KB brotli (cold + Lit)~3.2 KB marginal

Form-associated structured postal address composite input with autocomplete tokens (street-address, address-level2, address-level1, postal-code, country).

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

Multi-Framework Playground & Snippets

<script type="module" src="@methane-ui/ui/address-input"></script>
<mth-address-input></mth-address-input>

Properties & Attributes

PropertyAttributeTypeDefaultDescription
valuevaluestring""Serialized JSON string of structured address fields (empty string when all fields blank).
namenamestring""Form submission field name.
labellabelstring""Accessible fieldset legend.
hinthintstring""Helper text displayed below address grid.
errorerrorstring""Explicit validation error message.
includeLine2include-line2booleanfalseDisplays secondary address line 2 field.
disableddisabledbooleanfalseDisables all address inputs.
requiredrequiredbooleanfalseRequires street, city, postal code, and country.
readonlyreadonlybooleanfalsePrevents edits while remaining focusable.

Events

EventDetail TypeDescription
mth-input{ value: string; address: unknown }Fired synchronously when any address subfield updates.
mth-change{ value: string; address: unknown }Fired when any address subfield commits.

APG Keyboard Matrix

KeyDirectionWhenExpected Behavior
Tabbothfocused inside address gridmoves linearly through street, city, region, postal code, and country fields

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
keyboardImplements all 1 APG keyboard transitions across LTR/RTL.mth-address-input.spec.test.ts
statesExposes ElementInternals CustomStateSet flags: :state(dirty), :state(touched), :state(user-invalid), :state(disabled), :state(required), :state(readonly).Conformance suite
i18nRoutes 9 UI/ARIA strings through @methane-ui/core i18n catalog.Locale context test