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

<mth-bottom-nav>

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

Mobile-friendly viewport bottom navigation bar with horizontal roving focus, aria-current="page", badges, and safe URL validation.

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

Multi-Framework Playground & Snippets

<script type="module" src="@methane-ui/ui/bottom-nav"></script>
<mth-bottom-nav fixed></mth-bottom-nav>

Properties & Attributes

PropertyAttributeTypeDefaultDescription
labellabelstring""Accessible label for the <nav> landmark.
activeValueactive-valuestring""Value of the currently active destination.
activeHrefactive-hrefstring""Href of the currently active destination.
fixedfixedbooleantruePins the bar to the bottom of the viewport via position: fixed.
items—ReadonlyArray<unknown>[]Navigation destinations rendered in the bottom bar.

Events

EventDetail TypeDescription
mth-select{ value: string; label: string; href?: string }Fired when a bottom navigation item is activated.

APG Keyboard Matrix

KeyDirectionWhenExpected Behavior
ArrowRightltritem focusedmoves focus to next enabled item
ArrowLeftrtlitem focusedmoves focus to next enabled item
Homebothitem focusedmoves focus to first enabled item
Endbothitem focusedmoves focus to last enabled item

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 4 APG keyboard transitions across LTR/RTL.mth-bottom-nav.spec.test.ts
i18nRoutes 1 UI/ARIA strings through @methane-ui/core i18n catalog.Locale context test