Skip to main content
Version: 1.0.3

Cluster

The Cluster component is a layout primitive that helps you group related items with consistent spacing and alignment. It's particularly useful for navigation bars, button groups, tags, and other UI elements that need to be grouped together.

Item 1
Item 2
Item 3
Item 4
Item 5

Installation

ignix add component cluster

Usage Examples

import { Cluster } from '@ignix-ui/cluster';

Basic Usage

function TagList() {
return (
<Cluster>
{['React', 'TypeScript', 'JavaScript', 'CSS', 'HTML'].map((tag) => (
<span key={tag} className="px-3 py-1 bg-gray-100 rounded-full text-sm">
{tag}
</span>
))}
</Cluster>
);
}

Props

PropTypeDefaultDescription
spacing"none" | "small" | "normal" | "large""normal"Controls the spacing between items in the cluster
align"start" | "center" | "end" | "stretch" | "baseline""center"Controls the cross-axis alignment of items
justify"start" | "center" | "end" | "between" | "around" | "evenly""start"Controls the main axis alignment of items
wrapbooleantrueWhether items should wrap to the next line when they don't fit
classNamestring""Additional CSS classes to apply to the container
childrenReact.ReactNode-The content to be rendered inside the cluster