Brand Bar
A small layout primitive that sits at a page edge and frames the brand identity. Logo + name on the left, optional tagline next to it, optional actions (sign-in, theme toggle, etc.) anchored to the right.
The brand-bar is what you reach for when a <x-wirekit:: feels like overkill but a bare <x-wirekit:: link sitting on its own looks lonely. It carries the content-edge spine padding (--padding-wk-x-lg by default), so the brand's visible text lines up with the content below it: <x-wirekit:: with its default padding, and the prose headings inside it.
Default
With actions
The actions slot is anchored to the right edge via margin-left: auto on its wrapper, so sign-in links and account widgets stay flush with the bar's right content edge regardless of how much brand / tagline content sits to the left.
Sticky variant
Pass sticky and the bar pins to the top of the viewport during scroll while staying in flow, so the article body below needs no matching padding-top. Below a sticky announcement banner it pins under the banner rather than behind it. Pair with a <x-wirekit:: below for a sticky-stacked navigation header.
An element that takes the focus, or that a fragment link brings into view, comes to rest below the sticky bar rather than under it (keeping the focus clear of a pinned bar).
<x-wirekit::brand-bar sticky>
<x-slot:brand>
<x-wirekit::brand name="Acme" />
</x-slot:brand>
<x-slot:actions>
<x-wirekit::link href="/login" variant="muted" underline="none" size="sm">Sign in</x-wirekit::link>
</x-slot:actions>
</x-wirekit::brand-bar>
Container Composition
By default the brand-bar's content (brand, tagline, actions) runs the full width inside the bar's --padding-wk-x-* inset, which suits a page whose body runs edge to edge as well. Marketing landing pages often wrap their body in <x-wirekit:: for a centered column, and there a brand at the bar's left edge stands apart from the column below it.
Set container and the bar's content takes the same centered column:
<x-wirekit::brand-bar sticky container max="xl">
<x-slot:brand><x-wirekit::brand>Acme</x-wirekit::brand></x-slot:brand>
<x-slot:actions>
<x-wirekit::button>Sign in</x-wirekit::button>
</x-slot:actions>
</x-wirekit::brand-bar>
<x-wirekit::container max="xl">
{{-- Body content aligned with the brand-bar's logo on the same X-coordinate --}}
<x-wirekit::hero>
<x-slot:title>Welcome</x-slot:title>
</x-wirekit::hero>
</x-wirekit::container>
The brand-bar's outer <header> keeps the sticky behavior, the bottom border and the --color-wk-bg background at full width. The inner row takes the --size-wk-container-* width that max names and centers itself, so the logo stands on the same line as the body container below. See Composition Patterns for the broader chrome-vs-content axis discussion.
The preview below compares the two. It uses max="sm", a 40rem column, because an xl column is wider than the preview itself and would look like the default. On a phone both bars look the same, since the column is wider than the screen.
Composition with <x-wirekit::reading-toc>
A marketing landing page often stacks a brand-bar, a sticky TOC strip below it and the article underneath. Pass flush on the TOC and the strip drops its horizontal padding on the nav, the list and the first and last link, so the first link sits at the strip's edge. Without flush the strip keeps its own padding.
<main style="padding: 0;">
<x-wirekit::brand-bar>
<x-slot:brand>
<x-wirekit::brand name="Acme" />
</x-slot:brand>
<x-slot:tagline>Invoicing for small teams</x-slot:tagline>
</x-wirekit::brand-bar>
<x-wirekit::reading-toc flush />
<article style="padding: 0 var(--padding-wk-x-lg);">
<section id="features"><h2>Features</h2>...</section>
<section id="pricing"><h2>Pricing</h2>...</section>
<section id="faq"><h2>FAQ</h2>...</section>
</article>
</main>
The recipe at /blueprints/ is the canonical example.
See also
<x-wirekit::— the logo + name primitive that fills thebrand> brandslot<x-wirekit::— the TOC strip that pairs with brand-barreading-toc :flush> <x-wirekit::— heavier-weight page chrome with container + sticky modes for app shellsheader>
Props
| Prop | Type | Default | Description |
|---|---|---|---|
as |
string | header |
Semantic element wrapper. Use nav if the bar is the primary navigation. |
divider |
bottom | none |
bottom |
Bottom-edge 1 px border using --color-wk-border. none opts out. |
padding |
none | sm | md | lg | xl |
lg |
Inline padding tier from --padding-wk-x-*. lg matches <x-wirekit::main padding="lg">. |
sticky |
bool | false |
Pin to top: 0 during scroll via position: sticky. Carries --z-wk-sticky z-index. |
container |
bool | false |
When true, wraps the inner flex-row in a max-width container so the brand-bar's background, border and sticky behavior stay edge to edge while its content (brand, tagline, actions) aligns with the body's container-wrapped column. |
max |
sm | md | lg | xl | 2xl | full |
xl |
Container max-width tier when container=true. Reads --size-wk-container-* tokens so brand-bar + body align on the same vertical content-edge spine. |
tagline |
string | null | null |
Secondary text after the brand. The tagline slot takes the same place and wins when both are given. |
scope |
string | null | null |
Personalization scope. |
Slots
| Slot | Role |
|---|---|
brand |
Logo + name combo. Typically a <x-wirekit::brand> primitive. |
tagline |
Secondary text after the brand. Renders with --color-wk-text-muted. A plain line can be the tagline prop. |
| default | Additional flex children between tagline and actions. |
actions |
Right-anchored content (sign-in, theme toggle, account widget). Auto-spaces via margin-left: auto. |
Keyboard Interaction
Brand-bar is a presentational wrapper — it carries no keyboard state of its own. Any links, buttons, or interactive controls placed in its slots (typically the actions slot) receive native focus + activation behavior from the browser, so Tab and Shift+Tab move through them in source order and Enter / Space activate them per the standard control semantics.