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

<mth-reaction-bar>

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

Accessible emoji reaction pill bar with SelectionController toggling and RTL-aware RovingFocusController navigation.

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

Multi-Framework Playground & Snippets

<script type="module" src="@methane-ui/chat/reaction-bar"></script>
<mth-reaction-bar multiple allow-add></mth-reaction-bar>

Properties & Attributes

PropertyAttributeTypeDefaultDescription
reactions—ReadonlyArray<unknown>—List of reaction entries ({ emoji, count, active?, label?, disabled? }).
valuevaluestring""Comma-separated list of currently selected reaction emojis.
multiplemultiplebooleantrueAllows toggling multiple reaction pills simultaneously.
allowAddallow-addbooleantrueShows the trailing add-reaction action button.
disableddisabledbooleanfalseDisables all reaction interactions.
labellabelstring""Accessible group label for the reaction bar.

Events

EventDetail TypeDescription
mth-change{ value: string; values: ReadonlyArray<string>; emoji: string; selected: boolean }Fired when a reaction pill selection changes.
mth-add-reactionundefinedFired when the add-reaction button is activated.

APG Keyboard Matrix

KeyDirectionWhenExpected Behavior
ArrowLeft / ArrowRightbothreaction pill focusedmoves focus across reaction pills (RTL-aware)
Home / Endbothreaction pill focusedjumps to first or last reaction item
Enter / Spacebothreaction pill focusedtoggles selection and emits mth-change

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 3 APG keyboard transitions across LTR/RTL.mth-reaction-bar.spec.test.ts
statesExposes ElementInternals CustomStateSet flags: :state(disabled).Conformance suite
i18nRoutes 3 UI/ARIA strings through @methane-ui/core i18n catalog.Locale context test