App Bar

The top bar on tablets and phones, with the menu button, workspace, search and user.

import { AppBar } from "@sagui/ui";
Markdown
Loading demo

When to use

  • Below 1024px in a signed-in app, paired with MobileNavigation.

When not to use

  • AppShell already includes its own bar. Use AppBar when you compose the layout yourself.

Installation

Install the package and import the styles once. The installation guide covers the Tailwind setup.

$ npm install @sagui/ui

Usage

example.tsx
import { AppBar, MobileNavigation, SearchTrigger, Avatar } from "@sagui/ui";

<AppBar brand="Acme" onMenuClick={() => setOpen(true)} menuOpen={open} search={<SearchTrigger variant="icon" onOpen={openSearch} />} actions={<Avatar name="Sagnik Dey" size="sm" />} />

Accessibility

  • The menu button has aria-expanded and opens a dialog.
  • Hidden from 1024px by default, where the Sidebar takes over.

Also in navigation