Components · Navigation
Top Nav
StableAdded v0.0.1
A sticky app header: logo, main navigation links and trailing actions.
import { TopNav } from '@nexub/react';Playground
Props
surface
nexub
<TopNav.Root className="static w-full">…</TopNav.Root>Examples
Default
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| surface | 'solid' | 'glass' | 'solid' | Glass material on the bar — see Foundations → Materials. |
| scrollEdge | 'soft' | 'hard' | — | soft dissolves scrolling content under the bar (no divider); hard is an opaque band. Default: a divider. |
| TopNav.Logo / Menu / Actions | compound | — | The logo slot, the <nav> of links (scrolls sideways on narrow screens) and the end-aligned actions. |
| TopNavItem active | boolean | — | Marks the current page (aria-current="page"). |
| TopNavItem asChild | boolean | — | Use your router <Link> instead of an <a>. |
Accessibility
ARIA roles
bannernavigation
Notes
`TopNav.Root` is a `<header>`; `TopNav.Menu` is a `<nav>` named with the localised "Main navigation".
On iOS & Android
Web only
Top Nav has no @nexub/react-native twin. On phones, follow the platform pattern instead, or compose it from the native components listed on the React Native page.