App shell
Topbar
The 44px bar above a page: breadcrumbs on the left, page actions on the right. Inside an AppFrame it adds the phone menu button that opens the sidebar drawer.
Usage
- Use it as the
topbarof anAppFrameto show where the user is and the actions for the current page. - Keep actions few; on phones the “Edited” label, Copy link and Favorite are hidden and only the current crumb is shown.
- App screens: pass your own
actions(or none: the right side stays empty). Document pages: opt into the document actions withedited,onShare,onCopyLink,onFavoriteandmoreSlot. - Don’t use it as a site header with primary navigation; put navigation in the
Sidebar.
Installation
Install the package (React 19):
terminal
terminal
terminal
Import the styles once, in your app entry or root layout:
/src/main.tsx
Use it anywhere inside your app's <Theme> (see Installation):
/src/TopbarExample.tsx
Examples
Collapsed sidebar and favorite
Custom actions
Composition
anatomy
API Reference
Topbar
Based on <header>. Adds:
| Prop | Type | Default |
|---|---|---|
breadcrumbs | ReactNode | |
edited | ReactNode | null | |
actions | ReactNode | |
sidebarCollapsed | boolean | |
onOpenSidebar | () => void | |
onSidebarPeek | (peeking: boolean) => void | |
menuButton | boolean | true |
idle | boolean | false |
favorite | boolean | |
onShare | () => void | |
onCopyLink | () => void | |
onFavorite | () => void | |
moreSlot | ReactNode |
BreadcrumbTrail
Based on <div>.
| Prop | Type | Default |
|---|---|---|
items | Crumb[] | |
privacy | ReactNode | null | "Private" |
onPrivacyClick | () => void | |
label | string | "Breadcrumb" |
TopbarButton
Based on <button>. 28x28, radius 6.
| Prop | Type | Default |
|---|---|---|
icon | IconName | |
label | string | |
iconSize | number | 20 |
tone | "primary""secondary" | "secondary" |
tooltip | ReactNode |
TopbarActions
The document action cluster on its own (e.g. as a peek's actions). Each control renders only when its prop is set; with none it renders nothing.
| Prop | Type | Default |
|---|---|---|
edited | ReactNode | null | |
favorite | boolean | |
onShare | () => void | |
onCopyLink | () => void | |
onFavorite | () => void | |
moreSlot | ReactNode |
Accessibility
- Rendered as
header.BreadcrumbTrailis anav"Breadcrumb" with an ordered list; the last crumb hasaria-current="page". - Inside an AppFrame on phones, the "Open sidebar" menu button opens the drawer (
aria-expanded); focus returns to it when the drawer closes. - Every icon button has an
aria-labeland a tooltip; Favorite exposesaria-pressed. - With
idle, the bar fades out but comes back on hover and on keyboard focus (focus-within). - Pass a
Menu.TriggerasmoreSlotso the Actions button opens a keyboard-navigable menu.
© 2026 Motion. Internal documentation.