Skip to content
nexubDesign System
v11.9.0

Components · Navigation

Top Nav

StableAdded v0.0.1

A sticky app header: logo, main navigation links and trailing actions.

import { TopNav } from '@nexub/react';
View as Markdown

Playground

Props

surface
TSX
<TopNav.Root className="static w-full">…</TopNav.Root>

Examples

Default

Props

Props
PropTypeDefaultDescription
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 / Actionscompound—The logo slot, the <nav> of links (scrolls sideways on narrow screens) and the end-aligned actions.
TopNavItem activeboolean—Marks the current page (aria-current="page").
TopNavItem asChildboolean—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