Skip to content
Theme

Center

A block centred horizontally, no wider than the reading measure.

Examples

Centred block and text

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.

PropTypeDefaultDescription
as?ElementType"div"
centerText?booleanfalseCentre the text too, not only the block.
intrinsic?booleanfalseCentre each child at its own width instead of the measure.
childrenReactNode—

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.