Skip to main content
Version: 1.0.2

Section

Overview

The Section component is a versatile layout primitive that creates content sections with customizable vertical spacing, background colors, padding, and maximum width constraints. It's perfect for organizing content into distinct visual blocks with consistent styling and spacing throughout your application.

Preview

Beautiful Section

This is a stunning section with normal spacing, normal padding,readable max width, and none animation.

Responsive

Adapts beautifully to all screen sizes

Dark Mode

Perfect dark mode support built-in

Customizable

Endless styling possibilities

Current Settings

Spacing
normal
Padding
normal
Max Width
readable
Animation
none

Installation

npx @mindfiredigital/ignix-ui add section

Usage

Import the component:

import { Section } from './components/ui';

Basic Usage

import { Section } from './components/ui';

function MyComponent() {
return (
<Section>
<h2>Section Title</h2>
<p>Your content here</p>
</Section>
);
}

Props

PropTypeDefaultDescription
spacing"none" | "small" | "normal" | "large" | "xl" | "80px""normal"Controls vertical spacing between sections
maxWidth"sm" | "md" | "lg" | "xl" | "full" | "readable" | "800px"undefinedMaximum width constraint (supports custom values)
background"none" | "white" | "gray" | "slate" | "zinc" | "stone""none"Background color for the section
padding"none" | "small" | "normal" | "large" | "comfortable" | "generous" | "9px""normal" Padding around the content
classNamestring""Additional CSS classes
refReact.Ref<HTMLDivElement>undefinedForwarded ref for the section element
childrenReact.ReactNode-Content to be rendered inside the section