Skip to main content
Version: 1.0.3

Stack

The Stack component arranges its children in a vertical or horizontal stack with consistent spacing.
It’s ideal for layouts like button groups, form fields, navigation links, and responsive arrangements.

Installation

ignix add component stack

Usage

Import the component:

import { Stack } from '@ignix-ui/stack';

Basic Usage

<Stack responsive={{ mobile: "vertical", tablet: "horizontal", desktop: "horizontal" }}>
<Button>One</Button>
<Button>Two</Button>
<Button>Three</Button>
</Stack>

Props

PropTypeDefaultDescription
direction"vertical" | "horizontal" | "responsive""vertical"Sets the stack layout direction
align"start" | "center" | "end" | "stretch""stretch"Controls cross-axis alignment of items
justify"start" | "center" | "end" | "between" | "around""start"Controls main-axis alignment of items
spacing"none" | "xs" | "sm" | "normal" | "lg" | "xl" | string"normal"Sets the space between items
wrapbooleanfalseWhether items should wrap to the next line
responsiveobject-Configuration for mobile, tablet, and desktop directions
classNamestring-Additional CSS classes for the container
childrenReact.ReactNode-Content to be rendered inside the stack