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

<mth-network-status>

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

Reactive network connectivity indicator subscribing idempotently to browser online/offline events with live-region announcements and retry action.

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

Multi-Framework Playground & Snippets

<script type="module" src="@methane-ui/ui/network-status"></script>
<mth-network-status online retryable>Example</mth-network-status>

Properties & Attributes

PropertyAttributeTypeDefaultDescription
onlineonlinebooleantrueCurrent connectivity state (true when online).
showWhenOnlineshow-when-onlinebooleanfalseKeeps the indicator rendered even while online is true.
offlineLabeloffline-labelstring""Custom message shown when offline.
onlineLabelonline-labelstring""Custom message shown when back online.
retryableretryablebooleantrueShows a retry button while offline.

Events

EventDetail TypeDescription
mth-status-change{ online: boolean }Fired when connectivity transitions between online and offline.
mth-retryundefinedFired when the user triggers a manual retry check.

Accessibility Checklist

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