Skip to content
Eskais UI

Navigation

Mobile Nav

A bottom tab bar for narrow screens: a named navigation of up to five links with the icon above the label, aria-current on the current page, an optional badge, and More, which opens the rest above the bar. Fixed to the bottom above the safe area, 56px targets, hidden above narrow: unless `always`. Glass gives it a translucent chrome fill.

Example

Installation

npx shadcn@latest add @eskais/mobile-nav
Brings alongnavigation-menu
npm packageslucide-react

Usage

Import
import { MobileNav } from "@/components/ui/mobile-nav"

API reference

MobileNav

PropTypeDefault
labelrequiredNames the `<nav>` landmark.string–
itemsrequiredThe routes in the bar. The bar has five slots: up to five routes fill them when there is no `overflow`. With `overflow`, or more than five routes, the first four stay in the bar and the fifth slot is More, which opens the rest of `items` and then `overflow`.readonly MobileNavItem[]–
overflowLinks that only open from More, above the bar.readonly MobileNavItem[]noOverflow
moreLabelstring"More"
moreIconReactNodedots
renderLink(item: MobileNavItem) => ReactElement<Record<string, unknown>> | undefined–
alwaysShows the bar at every width, not only on narrow screens.booleanfalse

Also takes <nav> attributes except children, defaultValue.

Other exports

type MobileNavItemtype MobileNavProps

Agent actions

Runs agent.snapshot() from @ui-sdk/react/agent on the live preview above.