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

<mth-pagination>

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

Accessible numbered pagination landmark with localized labels, ellipsis collapsing, and aria-current="page".

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

Multi-Framework Playground & Snippets

<script type="module" src="@methane-ui/ui/pagination"></script>
<mth-pagination page="1" total-pages="1"></mth-pagination>

Properties & Attributes

PropertyAttributeTypeDefaultDescription
pagepagenumber1Current 1-indexed active page.
totalPagestotal-pagesnumber1Total number of available pages.
siblingCountsibling-countnumber1Number of sibling pages rendered around the active page.
boundaryCountboundary-countnumber1Number of boundary pages pinned at the start and end.
disableddisabledbooleanfalseDisables all pagination buttons.
labellabelstring""Custom accessible aria-label for <nav>.

Events

EventDetail TypeDescription
mth-change{ page: number }Emitted when the active page changes.

APG Keyboard Matrix

KeyDirectionWhenExpected Behavior
EnterbothPage, previous, or next button is focusedNavigates to the target page and emits mth-change
bothPage, previous, or next button is focusedNavigates to the target page 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 2 APG keyboard transitions across LTR/RTL.mth-pagination.spec.test.ts
statesExposes ElementInternals CustomStateSet flags: :state(disabled).Conformance suite
i18nRoutes 4 UI/ARIA strings through @methane-ui/core i18n catalog.Locale context test