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

<mth-presence-badge>

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

Accessible user presence indicator with shape-differentiated SVG markers for forced-colors safety.

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

Multi-Framework Playground & Snippets

<script type="module" src="@methane-ui/chat/presence-badge"></script>
<mth-presence-badge status="online" show-label>Example</mth-presence-badge>

Properties & Attributes

PropertyAttributeTypeDefaultDescription
statusstatus'online' | 'away' | 'busy' | 'offline'"offline"Presence availability state (online, away, busy, or offline).
labellabelstring""Optional accessible/visible status override text.
showLabelshow-labelbooleantrueDisplays the localized status label beside the indicator.
sizesize'sm' | 'md'"md"Badge sizing token (sm or md).

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(away), :state(busy), :state(offline).Conformance suite
i18nRoutes 5 UI/ARIA strings through @methane-ui/core i18n catalog.Locale context test