Skip to main content
Version: 1.0.3

Center

The Center component is a utility wrapper that helps you center its children horizontally, vertically, or both.
It supports different positioning strategies (flex, grid, absolute) and configurable minHeight.

Centered Content

Installation​

ignix add component center

Usage​

Import the component:

import Center from '@ignix-ui/center';

Basic Usage​

function BasicCenter() {
return (
<Center horizontal vertical>
<p>Centered Text</p>
</Center>
);
}

Props​

PropTypeDefaultDescription
horizontalbooleanfalseCenters children horizontally.
verticalbooleanfalseCenters children vertically.
variant"flex" | "grid" | "absolute""flex"Layout strategy used for centering.
minHeight"auto" | "screen" | "large" | custom| "small"| "medium""auto"Minimum height constraint (auto, screen, custom).