Sakani

Top Bar

The application header, in desktop and mobile variants.

type picks the layout, left supplies the content

type doesn't render a search field or a breadcrumb for you — it sets how the left region is laid out, and you pass the actual component through left. That's why the same bar can hold your router's breadcrumb or your own search input without either being hardcoded here.

Stripping it back

Settings

Mobile

TopBarMobile is a separate component rather than a breakpoint on this one, since the two have genuinely different slots. Swap between them at your layout's breakpoint.

InboxJD
Profile

TopBar props

PropTypeDefaultDescription
type'search' | 'breadcrumb' | 'tabs' | 'minimal' | 'chat''search'What the left region is for. It doesn't render that content — you pass it via left.
leftReactNodeThe left region's content: an Input, Breadcrumb, Tabs, or a plain title.
density'md' | 'sm''md'Bar height.
showTogglebooleantrueShows the sidebar toggle button.
onToggle() => voidFires from that toggle.
toggleIconLucideIconPanelLeftIcon for the toggle.
showActionsbooleantrueShows the built-in help and notification icons.
showHelpbooleantrueShows the help icon within that group.
hasUnreadbooleanfalsePuts the unread dot on the notification icon.
rightSlotReactNodeYour own content, rendered before the built-in icons.
accountReactNodeThe account cluster at the far right, typically an Avatar.

TopBarMobile props

PropTypeDefaultDescription
type'title' | 'title-centered' | 'title-action' | 'search''title'Layout. Centered is the iOS-style title; title-action adds a trailing action button.
titleReactNodeBar title.
trailingReactNodeTrailing slot for the title type, e.g. an Avatar.
searchReactNodeThe search field node, for the search type.
onMenu() => voidFires from the hamburger.
onAction() => voidFires from the trailing action button.
onClose() => voidFires from the close button where the type has one.