Topbar

A horizontal application header that aligns persistent identity or context, optional top-level navigation, and existing action controls. It owns the row and its regions — while AppShell or another parent owns the surrounding surface, boundary, placement, and responsive handoff.

Application header

The regions stay semantically distinct: the brand slot aligns left, destinations stay centered against the whole bar in a named navigation landmark, and global commands align right as existing icon Buttons. Current navigation stays interactive, while every icon’s accessible name remains visible through the existing Tooltip component.

Topbar · Application
Search Settings Notifications

Three equal grid regions keep the canonical BrandAsset left, navigation truly centered, and global actions right. Every icon action shares the sm + ghost + icon-only + rounded recipe. Click a destination to move aria-current="page"; hover or focus an icon to reveal its Tooltip.

Topbar · Brand surface

The same lockup artwork, dimensions, and circular action silhouette survive a colored context. Only currentColor and the complete ds-on-surface role set change with the host; identity and control geometry do not.

Anatomy

Only the horizontal content regions belong to Topbar. Navigation is optional rather than implied by the component name, and the actions region composes controls instead of restyling them.

PartElementRequirementRule
Rootheader.ds-topbarRequiredStructural row; parent owns surface, width, placement, and responsive behavior
Startdiv.ds-topbar__startOptionalLeading cluster rendered only when brand or persistent context belongs here
Brandds-topbar__brandOptionalCanonical BrandAsset lockup, stepping down to mark below its minimum; never live text or an interface icon
Contextds-topbar__contextOptionalOne short workspace or product-area label; truncates instead of wrapping
Navigationnav.ds-topbar__navOptionalOne distinctly named landmark for top-level destinations
Nav linka.ds-topbar__link1 or more with navNative destination; current route carries aria-current="page"
Actionsdiv.ds-topbar__actionsOptionalEnd-aligned existing controls; no Topbar-specific control behavior
Icon actionbutton.ds-topbar__icon-actionWhen usedComposed sm + ghost + icon-only + rounded Button with an accessible name

Navigation states

Top navigation links use the same compact 32px destination rhythm as SidebarNav. Current changes background and text color only, keeping every label at the resting weight so route changes cannot shift the row.

ExampleStateDriverRolesUsage
ProjectsResttext.secondaryAn available top-level destination
ProjectsHover:hovercontrol.bg-hovertext.primaryPointer preview
ProjectsActive:activecontrol.bg-activetext.primaryPress confirmation
ProjectsFocus:focus-visiblefocus.ringShared offset ring around the destination
ProjectsCurrent[aria-current="page"]selection.bgtext.primaryCurrent route, still linked and metrically unchanged

Usage notes

Topbar carries persistent application chrome, not whichever controls happen to fit in a horizontal row.

VerdictRule
DoUse Topbar for persistent application identity, scope, top-level navigation, and global or contextual actions.
DoRender at least one meaningful region; use the optional start region only when brand or persistent context belongs in Topbar.
DoUse one distinctly named navigation landmark, native destination links, and exactly one aria-current="page" without a weight change.
DoCompose existing controls in the actions region; use ds-topbar__icon-action for the canonical circular icon Button and wrap interactive Avatars in a real control.
DoUse the canonical BrandAsset lockup in every Topbar, stepping down to the mark only when its minimum width no longer fits.
Don’tAdd a background, border, shadow, width, sticky positioning, z-index, or breakpoint behavior; the parent and AppShell own those decisions.
Don’tRender destinations as Buttons or commands as navigation links; navigation moves somewhere and actions do something.
Don’tTurn Topbar into a second page header with arbitrary titles, breadcrumbs, filters, or dense page-specific actions.
Don’tHide, collapse, or reorder regions inside the component; AppShell owns responsive priority and Sheet owns transient navigation.
Don’tReplace the brand with an i-* interface icon, retype its wordmark, or switch global icon actions between rounded-square and circular silhouettes.