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
mobile-nav-demo.tsxCopy code
Installation
Copy code
Brings alongnavigation-menu
npm packages
lucide-reactUsage
ImportCopy code
API reference
MobileNav
| Prop | Type | Default |
|---|---|---|
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 |
moreLabel | string | "More" |
moreIcon | ReactNode | dots |
renderLink | (item: MobileNavItem) => ReactElement<Record<string, unknown>> | undefined | – |
alwaysShows the bar at every width, not only on narrow screens. | boolean | false |
Also takes <nav> attributes except children, defaultValue.
Other exports
type MobileNavItemtype MobileNavPropsAgent actions
Runs agent.snapshot() from @ui-sdk/react/agent on the live preview above.