Skip to main content
Copy for LLM

Center

A flex container that centers its children both horizontally and vertically. Replaces flex items-center justify-center boilerplate.

Basic Usage

An empty inbox, centered in its panel

No messages yet

Full-Page Centering

Give it the height of the screen, class="min-h-dvh", and the content stands in the middle of the page, for a loading state or an empty page. The preview below uses a fixed height to stand in for the screen:

A long import, centered on the page
Importing contacts

650 of 1,000 contacts imported

<x-wirekit::center class="min-h-dvh">
    <x-wirekit::progress :value="$imported" :max="$total" label="Importing contacts" />
</x-wirekit::center>

Inline Center

Use :inline="true" for an inline-flex variant that sits within text flow. Inside a paragraph, render it as a span with as="span", since a div cannot stand inside a <p>:

A step number centered in its circle, inside a sentence

2 Choose a plan. You can change it later from the billing page.

Props

Prop Type Default Description
inline bool false Use inline-flex instead of flex
as string 'div' HTML element to render
scope string|null null Scoped personalization name

Keyboard Interaction

This component is a layout wrapper. Keyboard interaction is delegated to its children.

Design Tokens

The Center is a pure layout primitive — it applies display: flex (or inline-flex) with align-items: center and justify-content: center, then renders its slot. It carries no color, border, typography, or spacing tokens of its own.

Updated in WireKit v2.74.1 (2026-11-25)

Was this page helpful?

Thank you for your feedback!

Voting requires cookies or local storage. What we store