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

<mth-bulk-action-bar>

@methane-ui/admin~7.9 KB brotli (kit + Lit)~2.0 KB marginal

Contextual selection toolbar (<mth-bulk-action-bar>) with Intl.PluralRules count formatting, select-all/clear triggers, and RTL-aware RovingFocusController.

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

Multi-Framework Playground & Snippets

<script type="module" src="@methane-ui/admin/bulk-action-bar"></script>
<mth-bulk-action-bar selected-count="0" total-count="0"></mth-bulk-action-bar>

Properties & Attributes

PropertyAttributeTypeDefaultDescription
selectedCountselected-countnumber0Number of currently selected rows/items.
totalCounttotal-countnumber0Total available item count for select-all state.
actions—ReadonlyArray<unknown>—Bulk action buttons rendered in the toolbar.
showWhenEmptyshow-when-emptybooleanfalseKeeps the toolbar visible when selectedCount is 0.

Events

EventDetail TypeDescription
mth-select-all{ totalCount: number }Emitted when select-all is clicked.
mth-clear-selectionRecord<string, never>Emitted when clear-selection is clicked.
mth-action{ id: string; selectedCount: number }Emitted when a bulk action button is clicked.

APG Keyboard Matrix

KeyDirectionWhenExpected Behavior
ArrowRightltrbulk toolbar has focusmoves focus to next action button
ArrowLeftrtlbulk toolbar has focus in RTLmoves focus to next action button

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