Center
A flex container that centers its children both horizontally and vertically. Replaces flex items-center justify-center boilerplate.
Basic Usage
Full-Page Centering
Combine with a height utility for full-viewport centering — great for loading states or empty pages.
Inline Center
Use :inline="true" for an inline-flex variant that sits within text flow.
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.