Skip to main content
Version: 1.0.3

Center

Overview

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.

Preview

Centered Content

Installation

ignix add component center

Usage

Import the component:

import Center from './components/ui';

Basic Usage

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

Variants

Centered Content

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).