Top Navigation

The horizontal bar for global wayfinding and primary actions.

v1.0.0·Updated Jul 9, 2026 · 12:00
Live Demo — Fully Interactive
Links with an L1/L2 dropdown, expanding search, notifications and profile
Configuration
Variant
Logo
Client switcher
Search
CTA
<TopNav clientSwitcher search cta={<Button/>} />
Behavior — The Engineering Contract
PropTypeNotes
brand / logoReactNode / booleanLogo lockup; can be hidden
variantfixed · floatingFlush to the top, or a lifted floating bar
links · mega{ label, href, active, items }[]Active underline; a link with items opens an L1 → L2 mega menu
clientSwitcher{ current, options, onChange }Workspace / client selector on the left
search / ctaboolean / ReactNode⌘K search and one warm primary action
notificationsNotification[]Bell with an unread dot and a dropdown
accountReactNodeAvatar opening a profile menu (Settings, Sign out)
responsiveLinks collapse behind a hamburger + left drawer on mobile

The bar handles top-level wayfinding and global actions. For deep product areas use the Side Navigation; for a trail within a page use Breadcrumbs.

Anatomy
1BrandLogo lockup, a link home.
2LinksSections; active carries a warm underline.
3ActionsCTA and account, right-aligned.
Do's and Don'ts
✓ Do

Keep the link set short — the top areas people switch between.

✕ Don't

Don't cram every page up here. Deep areas belong in a side rail.

✓ Do

One warm CTA on the right, beside search and account.

✕ Don't

Don't line up three warm buttons. One primary action, max.

In context: Examples
A · Product

A product bar with app sections and account.

B · Marketing

A marketing header with a single sign-up CTA.

C · Minimal

Brand plus account only, for focused apps.

Measurements & Tokens
TokenValueRole
--tnav-h56pxBar height
--tnav-bg#0C0D10Bar surface
--tnav-active2px #FF7A00Active-link underline
--tnav-link#9AA0A8Idle link colour
--tnav-search32px · #101114⌘K search field
--tnav-gap18pxRegion spacing
Code
<nav class="o-tnav" aria-label="Global">
  <span class="o-tnav__brand"><Logo /> Optimistic</span>
  <div class="o-tnav__links">
    <a class="o-tnav__link is-active" aria-current="page">Overview</a>
    <a class="o-tnav__link">Projects</a>
  </div>
  <div class="o-tnav__right">
    <button class="o-btn o-btn--brand">New</button>
    <Avatar>AL</Avatar>
  </div>
</nav>