Stable

Navigation Bar

Navigation Bars are Rail's mobile counterpart — a fixed bottom bar for 3–5 primary destinations below the md breakpoint. In this library, most apps don't mount it directly: Rail's withNavbar prop renders it automatically.

Overview

The Navbar component implements the Material Design 3 Navigation Bar pattern: a fixed horizontal bar of NavbarItems, each showing an icon and label with an active-state indicator.

Rail renders a Navbar internally when withNavbar is set, using its own RailItem list — you rarely compose Navbar by hand unless you need a standalone mobile-only nav bar with no rail at all.

Import

import { Navbar, NavbarItem } from '@noxlovette/material';

Live Demo

See it live, with Controls, in Storybook rather than a hand-rolled preview here.

widgets

Playground

Open the Navbar story — previewed at a mobile viewport, matching its md:hidden behaviour.

Basic Usage

Prefer Rail's withNavbar prop for the common case. Mount Navbar directly only for a standalone bottom bar:

<script lang="ts">
  import { Navbar, NavbarItem } from '@noxlovette/material';
</script>

<Navbar ghost>
  <NavbarItem label="Home"     href="/"        iconProps={{ name: 'house' }} />
  <NavbarItem label="Messages" href="/messages" iconProps={{ name: 'mail' }} badge={5} />
  <NavbarItem label="Settings" href="/settings" iconProps={{ name: 'settings' }} />
</Navbar>

Accessibility

visibility

Active state

Active items receive aria-current="page" from the underlying NavigationMenu.Link (Bits UI).

smartphone

Landmark

Rendered inside a NavigationMenu.List, announced by assistive tech as a navigation landmark.