Skip to main content
Version: 1.0.2

Split

Overview

The Split component simplifies the creation of two-column layouts such as sidebars with content, image and text sections, or dashboard layouts.
It supports ratios, gaps, responsive stacking, and optional resizing.

Preview

Play with the settings and preview the component in action:

Preview

Left Content
Right Content

Installation

npx @mindfiredigital/ignix-ui add split

Usage

Import the component:

import { Split, Left, Right } from './components/ui';

Basic Example

<Split ratio="30:70" mobile="stack" gap="normal">
<Left>
<div className="p-4 bg-red-500 text-white rounded">Sidebar</div>
</Left>
<Right>
<div className="p-4 bg-yellow-500 text-white rounded">Main Content</div>
</Right>
</Split>

Props

PropTypeDefaultDescription
ratio"30:70" | "40:60" | "50:50" | "60:40" | "70:30""50:50"Defines the column ratio between left and right sections
gap"none" | "small" | "normal" | "large""normal"Controls the space between the two sections
mobile"stack" | "keep-split" | "reverse""stack"Defines how layout behaves on small screens
minWidthstring (e.g. "300px", "20rem")"300px"Minimum width before stacking occurs
resizablebooleanfalseAllows user to drag and resize split ratio dynamically
classNamestring""Additional CSS classes
children<Left> and <Right> componentsRequiredDefines the left and right sections of the split layout

Examples

Dashboard Layout

Sidebar
Main Dashboard Area

Resizable Split

Drag to Resize
Resizable Panel