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

<mth-newsletter-form>

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

Form-associated (ElementInternals) newsletter signup widget composing FormControlController and InputController with email constraint validation and mth-submit event.

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

Multi-Framework Playground & Snippets

<script type="module" src="@methane-ui/ui/newsletter-form"></script>
<mth-newsletter-form name="email" required>Example</mth-newsletter-form>

Properties & Attributes

PropertyAttributeTypeDefaultDescription
valuevaluestring""Current email input value synchronized with the host form.
namenamestring"email"Form field name submitted to parent <form>.
headingheadingstring""Optional heading overriding the default localized title.
placeholderplaceholderstring""Placeholder text for the email input.
submitLabelsubmit-labelstring""Custom submit button label.
requiredrequiredbooleantrueMarks the email field as required.
disableddisabledbooleanfalseDisables the email input and submit button.
submittedsubmittedbooleanfalseDisplays the confirmation status banner after submission.

Events

EventDetail TypeDescription
inputundefinedFired when the email value changes during typing.
changeundefinedFired when the email value commits.
mth-submit{ email: string }Cancelable event fired with { email } when valid email submission occurs.

APG Keyboard Matrix

KeyDirectionWhenExpected Behavior
Enterbothemail input focusedValidates and submits the newsletter subscription.

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-newsletter-form.spec.test.ts
statesExposes ElementInternals CustomStateSet flags: :state(submitted), :state(invalid), :state(disabled).Conformance suite
i18nRoutes 9 UI/ARIA strings through @methane-ui/core i18n catalog.Locale context test