Skip to main content
Copy for LLM

Content-Edge Spine

The content-edge spine is the vertical X-coordinate where every page-level WireKit primitive's inline content begins. Top-level wrappers reading --padding-wk-x-lg for their inline padding share this coordinate by default — so a brand logo inside <x-wirekit::brand-bar> sits on the same vertical line as the first paragraph rendered by <x-wirekit::main>, the first column inside <x-wirekit::footer>, the first heading inside <x-wirekit::cta>, and so on.

This page is the contract for spine participation: which components participate, which don't, and how to opt a developer-authored custom component into the spine.

Why the spine matters

Without a shared spine, every page-level component picks its own inline padding. Visually this produces a jagged left edge — the logo flush-left at, say, 1.5 rem, but the first paragraph 2.5 rem in, and the footer columns starting at 1 rem. The eye tracks the misalignment as visual noise.

With the spine, every component reads the same --padding-wk-x-lg token. A developer overriding the token in :root {} re-aligns every participant in lockstep. Layout authoring becomes "compose the primitives, set the spine value once, done" instead of per-component pixel tuning.

Participating components

Component Spine padding token Participates? Notes
<x-wirekit::brand-bar> --padding-wk-x-lg (default padding="lg") YES Page-chrome header. Default padding tier matches main / footer / cta.
<x-wirekit::main> --padding-wk-x-lg (default padding="lg") YES Primary content area. The spine's anchor — every other participant's left edge aligns with main's first body paragraph.
<x-wirekit::container> --padding-wk-x-lg with padding="lg" (the default is md) YES Generic content wrapper. Its inline padding reads the --padding-wk-x-* tiers, and its max width grows by twice the padding, as the navbar's does, so its content box lands on the tier: with padding="lg" its content starts on the same line as a brand bar or a hero with the same tier, at every width.
<x-wirekit::navbar> --padding-wk-x-lg (on the outer row) YES Page-chrome navigation. The one participant that widens its own cap: with container=true the max-width grows by twice the padding, so the navbar's content box lands on the tier rather than its outer edge, and its links sit on the same spine as every other page-edge component.
<x-wirekit::header> --padding-wk-x-lg YES Layout-primitive header (distinct from <x-wirekit::brand-bar>).
<x-wirekit::footer> --padding-wk-x-lg YES Page footer. Column-grid, brand+legal row, and default slot all read the same inner max-width plus the spine padding.
<x-wirekit::cta> --padding-wk-x-lg YES Call-to-action banner. Its inline padding is the spine's; its copy is centered in a narrower md column, so the title itself does not start on the spine.
<x-wirekit::spine-aware> --padding-wk-x-lg (default tier="lg") YES Opt-in helper wrapper for developer-authored components — pass slot content and it joins the spine. Reads the canonical --padding-wk-x-lg via the WireKit::spinePadding('lg') helper. Pass tier="sm" / "md" / "xl" to read a different --padding-wk-x-* tier (deliberately steps off the page-edge spine).
<x-wirekit::hero> --padding-wk-x-lg (outer); inner copy/aside flex layout has its own padding OUTER-ONLY See Hero internal layout below.
<x-wirekit::section> depends on padding prop OPT-IN When padding="lg", participates. Other tiers (sm / md / xl) deliberately step off the spine — useful for visually-distinct full-width sections.
<x-wirekit::shell-bar> --padding-wk-x-lg (default padding="lg") YES The aligned head of a shell column. On the content column it carries the spine, so a page title in the bar sits on the same vertical line as the first paragraph of main below it. padding="none" deliberately steps off — that is the rail's head, whose content is a centered mark rather than text on the spine, and padding="sm" matches the sidebar's own narrower tier.
<x-wirekit::sidebar> --padding-wk-x-sm (smaller tier) DIFFERENT-TIER The sidebar's inboard edge aligns with main's inner edge (the spine), but the sidebar's own inline padding is sm so its content fits in a narrower column. Not the spine itself; an adjacent tier.
<x-wirekit::reading-toc> (with flush prop) none (zero horizontal padding) OFF-SPINE In flush mode the reading-TOC strip runs viewport-edge-to-viewport-edge — zero horizontal padding on the nav, the inner list, and the first / last link. The strip's chrome (background + bottom border) and the visible "Features" / "Pricing" / "…" text both run flush to the viewport boundary. Deliberately off-spine: the strip is a chrome surface, not a content-edge participant. Without flush the strip reads --reading-toc-padding-x for its inner list padding (dedicated reading-* tier, currently 1rem).

What each marker commits to across versions is in Stability tiers below.

Hero internal layout

The hero is the one ambiguous case in the participant table. Its outer <section> reads --padding-wk-x-lg, so the hero's box lines up with the brand bar, main and the footer above and below it.

Its copy does not always start on that line. Below the lg breakpoint the balanced, lead and stacked layouts center the copy, and centered centers it at every width. From lg up, the first three set it left-aligned in a column that starts at the section's padding, so the title sits on the spine there.

For a title on the spine at every width, compose it yourself inside a container:

{{-- 1. The container carries the spine padding; the heading starts on it at every width. --}}
<x-wirekit::container max="xl" padding="lg">
    <x-wirekit::heading level="1">Spine-aligned title</x-wirekit::heading>
    <x-wirekit::text>Spine-aligned lede.</x-wirekit::text>
    <x-wirekit::button>Spine-aligned action</x-wirekit::button>
</x-wirekit::container>

Stability tiers

Each participation marker carries a stability commitment:

Tier Meaning Components
Lockstep-enforced Reads --padding-wk-x-lg in every minor version; WireKit's own tests hold it. brand-bar, main, container, header, footer, cta, navbar, shell-bar, spine-aware
Outer-only enforced The outer section reads --padding-wk-x-lg in every minor version; the alignment of the copy inside it (see above) may change in a minor release. hero
Opt-in Participation is the developer's choice via the prop value — no enforcement. section (only when padding="lg")
Different tier Component reads a related-but-distinct token. Spine alignment is incidental, not contractual. sidebar (reads --padding-wk-x-sm)
Off-spine Deliberately zero or non-spine padding. Chrome surface, not a content-edge participant. reading-toc (with flush prop: zero padding viewport-edge-to-viewport-edge)

How to extend — developer-authored components

For a developer-authored custom component that wants to join the spine, the canonical path is <x-wirekit::spine-aware> — a thin Blade wrapper that emits the spine padding for you:

<x-wirekit::spine-aware>
    {{-- your content sits on the spine with no manual class wrangling --}}
    <h1>Spine-aligned headline</h1>
    <p>Spine-aligned body.</p>
</x-wirekit::spine-aware>

For more control, use the WireKit::spinePadding(string $tier) helper directly in any class string:

<div class="{{ \Pushery\WireKit\WireKit::spinePadding('lg') }} mt-8 mb-4">
    {{-- spine-aligned content with extra surrounding spacing --}}
</div>

Both options route through the canonical --padding-wk-x-lg token. Hand-typing px-[var(--padding-wk-x-lg)] works too, but the helper protects against tier typos (--padding-wk-x-mg instead of lg).

Manual path — writing the token by hand:

  1. Read --padding-wk-x-lg for inline padding. In Blade:

    <div class="px-[var(--padding-wk-x-lg)]">
        {{-- spine-aligned content --}}
    </div>
    
  2. Don't add inner padding before the first content child. A nested wrapper with its own px-… shifts the visible text off the spine.

  3. Reference <x-wirekit::brand-bar>'s blade source as a model. The brand-bar reads --padding-wk-x-lg via its padding="lg" default and applies it consistently across both container-wrapped and edge-to-edge modes — the canonical reference implementation.

  4. Developer-tunable. Override --padding-wk-x-lg once in your :root {} block to re-align every participant simultaneously:

    :root {
        --padding-wk-x-lg: 2rem;  /* every spine participant shifts to 2rem inline padding */
    }
    

See Also

Was this page helpful?

Thank you for your feedback!

Voting requires cookies or local storage. What we store