Theme
Center
A block centred horizontally, no wider than the reading measure.
Examples
A block no wider than the measure, centred, with its text centred too.
Props
Center
A block centred horizontally, no wider than the reading measure.
| Prop | Type | Default | Description |
|---|---|---|---|
as? | ElementType | "div" | |
centerText? | boolean | false | Centre the text too, not only the block. |
intrinsic? | boolean | false | Centre each child at its own width instead of the measure. |
children | ReactNode | — |
Accessibility
- No interaction of its own: it is static content, so there is nothing to operate by keyboard.
- Built from logical properties (inline and block), so it mirrors in right-to-left text.