Navigation
Links for moving between the main areas of your app or site.
Usage
Navigation is a compound component. The root is a <nav> landmark that shares variant, size, and orientation with every link through context, and tracks which link is current via activeLink. The parts live under @appica/ui-react/navigation:
Navigation— the<nav>landmark and styling context. Give it anaria-label.NavigationList— the<ul>that lays the links out as a row (or column).NavigationItem— one<li>wrapper.NavigationLink— a link. By default an<a>; mark itactive(or give it avaluematching the root'sactiveLink) to highlight the current section. Project it onto a router link withrender.
Set the current item in one of two ways: pass activeLink on the root and a matching value on each link (handy when a route maps to a key), or set active directly on the one current link. A per-link active always wins over the root's activeLink.
Reach for Navigation to move between distinct pages or sections. To swap panels within a single page, use Tabs; for navigation that opens rich link panels on hover, use a Navigation Menu; for the trail showing where you are, use a Breadcrumb.
Examples
Basic
A horizontal row of links with the current section highlighted. Each NavigationLink carries a value; the root's activeLink picks the matching one and stamps it with aria-current="page".
Variants
variant sets how the active and hovered link is drawn. pill (default) fills a rounded background; line slides an underline in from the side. Both animate, and respect reduced-motion.
Sizes
size on the root scales the link text, padding, and icon size together — sm, md (default), or lg.
With icons & badges
Put a leading icon on data-icon="start" and a trailing Badge on data-icon="end" so the link reserves the right padding. The icon inherits the link's size.
Vertical sidebar
Set orientation="vertical" to stack the links into a sidebar. Links go full-width, the active background or underline reorients, and the padding tightens for a denser column.
Indicator variant
The indicator variant — vertical only — hides a chevron that slides in on hover or when active, a common pattern for documentation sidebars. Pass your own marker with the indicator prop on a link.
Controlled selection
Drive the active item from state when the highlight follows in-page selection rather than the URL. Project each link onto a <button> with render and update activeLink on click.
Router links
For client-side routing, project a NavigationLink onto your framework's link via render — here a Next.js Link. The link keeps its variant, size, and active styling. Mark an unavailable destination disabled to dim it and drop it from the tab order.
RTL
Every Appica UI component supports right-to-left layouts out of the box. Set the dir attribute on a container (commonly your <html> element) so CSS logical properties resolve correctly, and wrap your tree in DirectionProvider so direction-aware behavior follows the same direction.
Links lay out from the right, the line underline grows from the inline-start edge, and the indicator chevron mirrors. For setup details and caveats, see the RTL guide.
API reference
Navigation is a set of styled HTML elements sharing context. Each part forwards every remaining prop to its underlying element (nav, ul, li, a), so any native attribute works here — the tables below list the Appica additions and the most common props.
Navigation
The <nav> landmark and styling context.
NavigationList
The <ul> that arranges the items, with orientation-aware spacing.
NavigationItem
One link's <li> wrapper.
NavigationLink
A navigation link. Built on Base UI's useRender; renders an <a> by default. Inherits variant, size, and orientation from the root unless overridden per-link.
Accessibility
Navigationrenders a<nav>landmark — always give it anaria-label(oraria-labelledby) so multiple navs on a page are distinguishable.- The current link is stamped with
aria-current="page", announced as the current item without changing its role. - A vertical navigation sets
data-orientation="vertical"on the landmark (styling hook —aria-orientationisn't valid on<nav>). disabledlinks setaria-disabledand are removed from the tab order.- Links are ordinary keyboard-focusable anchors (or whatever element you
render), with a visible focus ring. - Hover/active transitions are skipped when the user prefers reduced motion.