Topbar

A top navigation bar with left, center and right slots.

Basic

Renders a full-width bar with a bottom border. Use title to display a brand name in the left slot.

My App
<Topbar title="My App" />

With slots

Use left, center and right to place any content into the three layout zones.

My App
<Topbar
left={<span className="text-sm font-semibold">My App</span>}
center={<Input placeholder="Search…" className="max-w-xs" />}
right={<Button variant="primary" size="sm">New project</Button>}
/>

Position

Control how the bar is positioned in the document with the position prop.

{/* Scrolls with content (default) */}
<Topbar title="My App" position="static" />

{/* Stays at the top while scrolling */}
<Topbar title="My App" position="sticky" />

{/* Removed from document flow, spans the viewport */}
<Topbar title="My App" position="fixed" />

Without border

Set bordered={false} to remove the bottom border — useful when the bar sits above a coloured hero or custom header.

<Topbar title="My App" bordered={false} />

Props

PropTypeDefaultDescription
titlestringBrand name rendered in the left zone alongside left
leftReactNodeContent anchored to the left
centerReactNodeContent centered in the available space
rightReactNodeContent anchored to the right
position'static' | 'sticky' | 'fixed''static'CSS positioning strategy for the bar
borderedbooleantrueShows a bottom border separating the bar from page content
classNamestringAdditional Tailwind classes on the root element