Topbar
BetaNavigationOpen in the workshop
Page title, global search, notifications and the account, on frosted glass.
header.xg-topbar > .xg-topbar__title + .xg-spacer + .xg-input-group + .xg-notify + .xg-avatarExample and markup
Live, from xg-ui.css and xg-ui.js. Switch the brand and mode on the example itself, or for the whole site in the header.
Markup
<div style="border:1px solid var(--xg-color-border-default);border-radius:var(--xg-radius-card);overflow:hidden">
<header class="xg-topbar">
<h2 class="xg-topbar__title">Campaigns</h2>
<span class="xg-spacer">
</span>
<div class="xg-input-group">
<svg class="xg-icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false">
<circle cx="11" cy="11" r="7"/>
<path d="m20 20-3.5-3.5"/>
</svg>
<input class="xg-input xg-input--sm" type="search" placeholder="Search" aria-label="Search everything">
<span class="xg-input-group__affix">
<kbd class="xg-kbd">/</kbd>
</span>
</div>
<button class="xg-btn xg-btn--ghost xg-btn--icon xg-notify" type="button" aria-label="Notifications, 2 unread">
<svg class="xg-icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false">
<path d="M6 8a6 6 0 1 1 12 0c0 7 3 9 3 9H3s3-2 3-9"/>
<path d="M10.3 21a1.9 1.9 0 0 0 3.4 0"/>
</svg>
</button>
<span class="xg-avatar" aria-label="Account: Ops team" role="img">OT</span>
</header>
</div>When to use it
Use it for
top of every authenticated screen, sticky.
Not for
putting page actions here; they belong in the page head.
Rules
- Glass (glass-strong + header blur) so content scrolls under it; solid when transparency is reduced.
- The notification dot uses the brand accent (decoration) and the button says the count in its label.
Accessibility
- Search has a visible shortcut and an aria-label; “/” focuses it.
Every color pair this component uses is measured for both brands in light and dark on the Accessibility page.
Related
Also in Navigation: Sidebar navigation, Tabs, Breadcrumb, Wizard steps, Dropdown menu. Used in the patterns Dashboard.
Status Beta: usable; class names may still change in a minor release, with a note (see Releasing).