Topbar
Loading example…
Topbar is part of the Shell set, imported from @jcsoftdev/ui/shell.
Import
Section titled “Import”import { Topbar } from "@jcsoftdev/ui/shell";Single-component entry points tree-shake to just this component: @jcsoftdev/ui/shell/topbar.
<Topbar breadcrumbs={["Barbería", "Agenda", "Hoy"]} breadcrumbsLabel="Ruta de navegación" menuLabel="Abrir menú" searchLabel="Buscar" searchPlaceholder="Buscar cliente, cita o producto"/>| Prop | Type | Default | Description |
|---|---|---|---|
start |
ReactNode |
Slot at the far start, after the menu button and before the breadcrumbs (a logo, a venue switcher). | |
breadcrumbs |
string[] |
Breadcrumb trail in order; the last entry is the current view. Nothing renders when absent or empty. | |
breadcrumbsLabel |
string |
Accessible name of the breadcrumb landmark. | |
onOpenMenu |
(() => void) |
Menu button (shown when the AppShell container is under 900 px, matching the Sidebar drawer) that opens the sidebar drawer. Needs an @container/app ancestor, which AppShell provides. Omitted when not set. |
|
menuLabel |
string |
||
menuButtonRef |
Ref<HTMLButtonElement> |
Ref to the menu button so the opener can restore focus when the drawer closes. | |
onSearch |
(() => void) |
Called by the search trigger and by Cmd/Ctrl+K. The trigger and the shortcut are absent without it. | |
searchLabel |
string |
Accessible name of the search trigger; defaults to the placeholder. | |
searchPlaceholder |
string |
||
actions |
ReactNode |
Slot between the search trigger and the end block (status, notifications, primary action). | |
end |
ReactNode |
Slot at the far end (e.g. the account menu). | |
className |
string |
||
style |
CSSProperties |
Inline style of the root (for example liquidStyle() options). |
|
material |
"solid" | "glass" | "glass-clear" | "liquid" | "liquid-clear" |
Surface material. Omitted keeps the default for this layer (opaque, glass in the glass preset); "glass" and "glass-clear" are frosted glass, "liquid" and "liquid-clear" Liquid Glass, "solid" forces opaque. Liquid options go in style (`liquidStyle(… |
|
classNames |
Partial<Record<TopbarPart, string>> |
Per-part classes merged with cn; consumer classes win. className still targets the root and is merged last. |
* marks a required prop.
Storybook stories
Section titled “Storybook stories”- Default
- Without Search
- Single Crumb
- With Actions And End
- Mobile Without Menu
- Panel Layout
- With Start Slot
- Narrow
- Without Search Or Breadcrumbs
Source
Section titled “Source”packages/ui/src/shell/topbar/topbar.tsx