Skip to main content
Copy for LLM

Composition Patterns — Chrome vs. Content

Every page-edge primitive in WireKit (brand-bar, header, footer, hero, cta, section) sits on a single composition axis: chrome vs. content.

  • Chrome = the bar's visual frame (background color, top/bottom border, sticky behavior, drop shadow). Typically spans viewport edge-to-edge so the visual frame is uninterrupted across screen widths.
  • Content = the brand logo, navigation links, action buttons, headline copy. Typically centered inside a max-width column (e.g. max-w-[var(--size-wk-container-xl)]) so the eye doesn't have to track ultra-wide line lengths.

When chrome and content live on the same X-coordinate spine, the page feels intentional. When they diverge, the brand bar's logo "floats" relative to the page heading below it — a small misalignment that compounds visually across the full page height.

This page documents the contract WireKit uses to keep them aligned, and shows which primitive exposes which API for opting into either mode.

The Two Modes

Edge-to-edge content (default for most primitives)

Both chrome and content span viewport-edge to viewport-edge. The brand-bar's logo sits at the bar's --padding-wk-x-lg inset; the bar's bottom border crosses the full viewport width.

<x-wirekit::brand-bar sticky>
    <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::hero>
    <x-slot:title>Welcome to Acme</x-slot:title>
</x-wirekit::hero>

This works when:

  • Your page below the bar also renders edge-to-edge (no inner container).
  • Or the bar's brand position aligns with the body's left content edge because both read the same padding.

Container-wrapped content (opt-in via container prop)

Chrome stays edge-to-edge (background, border, sticky behavior), but content lives inside a max-width column, so on a wide screen the logo stands above the page's content rather than at the viewport's edge.

<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::hero>
    <x-slot:title>Welcome to Acme</x-slot:title>
</x-wirekit::hero>

The brand-bar's outer <header> keeps the sticky behavior + the bottom border + the full-width background. The inner flex-row carries the max-w-[var(--size-wk-container-xl)] + mx-auto, so the logo starts at the edge of an xl column. The hero carries its own padding and the same column, so from lg up its title starts on that line too; below lg the hero centers its copy.

A <x-wirekit::container max="xl" padding="lg"> stands on the same line: its max width grows by twice its padding, so its content box is the xl column, and padding="lg" is the brand bar's padding, so below that width the two start their content at the same place as well.

Per-primitive Participation

Primitive Edge-to-edge default container prop max prop Internal hardcoded max
<x-wirekit::brand-bar> yes yes yes (sm/md/lg/xl/2xl/full, default xl) none
<x-wirekit::header> yes yes (boolean only) no — hardcoded 2xl when container=true 2xl
<x-wirekit::footer> yes n/a (footer always has an inner wrapper) yes (sm/md/lg/xl/2xl/full, default xl) none
<x-wirekit::hero> n/a n/a (hero always uses an inner max-width content wrapper, hardcoded xl) no xl (intentional — hero copy needs the focus column)
<x-wirekit::cta> n/a n/a no md (narrow conversion-focused)
<x-wirekit::section> yes (slot is raw) no no n/a — developer applies their own <x-wirekit::container> inside

The variance reflects each primitive's primary use case: hero and cta benefit from narrow content columns regardless of viewport, whereas brand-bar and footer are flexible chrome that should match whatever the body container width is.

Worked Example — Landing Page Skeleton

<!DOCTYPE html>
<html lang="en">
<head>
    @vite('resources/css/app.css')
    @wirekitStyles
</head>
<body>
    <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::hero variant="dark" gradient size="lg">
        <x-slot:title>Every push gets its own URL.</x-slot:title>
        <x-slot:lede>Acme builds the branch, runs your gate against it, and hands back an address you can send to a reviewer.</x-slot:lede>
        <x-slot:actions>
            <x-wirekit::button intent="neutral" surface="filled">Connect a repository</x-wirekit::button>
        </x-slot:actions>
    </x-wirekit::hero>

    <x-wirekit::container max="xl" padding="lg">
        <x-wirekit::feature-grid cols="1 sm:2 lg:3" stagger>
            <x-wirekit::feature animateIn="slide-up" title="Preview environments">Each branch gets its own database seeded from a masked production snapshot.</x-wirekit::feature>
            <x-wirekit::feature animateIn="slide-up" title="Rollback in one command">Every release keeps the previous build warm, so going back does not rebuild anything.</x-wirekit::feature>
            <x-wirekit::feature animateIn="slide-up" title="Queue workers included">Horizon runs beside the app on the same deploy, with its own health check.</x-wirekit::feature>
        </x-wirekit::feature-grid>
    </x-wirekit::container>

    <x-wirekit::cta variant="accent" size="md">
        <x-slot:title>Point it at a repository and open the pull request.</x-slot:title>
        <x-slot:actions>
            <x-wirekit::button intent="neutral" surface="filled">Read the setup guide</x-wirekit::button>
        </x-slot:actions>
    </x-wirekit::cta>

    <x-wirekit::footer max="xl">
        <x-slot:brand>Acme · © 2026</x-slot:brand>
        <x-slot:legal>
            <a href="/privacy">Privacy</a>
            <a href="/terms">Terms</a>
        </x-slot:legal>
    </x-wirekit::footer>

    @wirekitScripts
    @livewireScripts
</body>
</html>

The brand logo, the footer's content and, from lg up, the hero's headline start at the edge of the xl column. The feature grid sits in a <x-wirekit::container>, whose padding is inside its max width, so on a wide screen its cards start one --padding-wk-x-lg further in. The cta centers its title in its own narrower column. The backgrounds of the brand bar, the hero, the cta and the footer run edge to edge across the viewport.

Decision Tree

"My page has edge-to-edge content (no inner container)" → Use the primitives with their defaults. Don't opt into container=true or set max.

"My page has container-wrapped content" → Pass container max="xl" (or whichever max-value matches your body) to brand-bar. → Pass max="xl" to footer. → Hero and cta have their own intentional internal max-widths — leave alone. → Wrap section content in your own <x-wirekit::container> as needed.

"My page mixes edge-to-edge sections (e.g. full-bleed image carousel) with container-wrapped sections" → The brand-bar typically stays at the page top regardless of section style. → Per-section, use <x-wirekit::container> only around the container-wrapped ones; let the edge-to-edge ones render outside.

Cross-references

Was this page helpful?

Thank you for your feedback!

Voting requires cookies or local storage. What we store