Skip to main content
Version: 1.0.2

Cluster

Overview

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.

Preview

Item 1
Item 2
Item 3
Item 4
Item 5

Installation

npx @mindfiredigital/ignix-ui add 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
childrenReactNode-The content to be rendered inside the cluster

Usage Examples

Basic Usage

import { Cluster } from '@mindfiredigital/ignix';

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>
);
}