Skip to main content
Version: 1.0.2

HeaderLayout

Overview

The HeaderLayout component provides a complete layout solution with a header, sidebar, and footer. It's designed to be highly configurable with support for responsive design, animations, and various layout variants. This component is perfect for building dashboards, admin panels, and complex web applications.

Preview

Welcome to Header Layout

This is a demonstration of the HeaderLayout component with various configuration options.

Features

  • • Responsive sidebar with mobile support
  • • Configurable animations and transitions
  • • Sticky header and footer options
  • • Multiple layout variants

Configuration

  • • Variant: default
  • • Sidebar Position: left
  • • Mobile Breakpoint: md

Interactive Demo

Try resizing the browser window to see the responsive behavior in action.

Content Area

This is the main content area. The HeaderLayout component provides a flexible layout system with a header, sidebar, and footer that can be configured in various ways.

© 2024 My Application. All rights reserved.

Installation

npx @mindfiredigital/ignix-ui add header-layout

Usage

import { HeaderLayout } from './components/header-layout';

function HeaderLayoutDemo() {
return (
<HeaderLayout
variant="default"
sidebarPosition="left"
animation="slide"
mobileBreakpoint="md"
stickyHeader={true}
stickyFooter={false}
overlay={true}
enableGestures={true}
header={<div>Header Content</div>}
sidebar={<div>Sidebar Content</div>}
footer={<div>Footer Content</div>}
>
<div>Main Content</div>
</HeaderLayout>
);
}

Props

PropTypeDefaultDescription
headerReact.ReactNodeundefinedContent for the header section
sidebarReact.ReactNodeundefinedContent for the sidebar section
footerReact.ReactNodeundefinedContent for the footer section
childrenReact.ReactNodeundefinedMain content area
variant"default" | "dark" | "light" | "glass" | "gradient""default"Visual theme variant
sidebarPosition"left" | "right""left"Position of the sidebar
animation"none" | "slide" | "fade" | "scale" | "bounce""slide"Animation type for transitions
mobileBreakpoint"sm" | "md" | "lg""md"Breakpoint for mobile behavior
stickyHeaderbooleantrueWhether header should be sticky
stickyFooterbooleanfalseWhether footer should be sticky
overlaybooleantrueWhether to show overlay on mobile
enableGesturesbooleantrueWhether to enable touch gestures
sidebarWidthnumber250Width of sidebar in pixels
sidebarCollapsedWidthnumber64Collapsed width in pixels
headerHeightnumber64Header height in pixels
footerHeightnumber64Footer height in pixels
contentPaddingstring"p-4 lg:p-6"Padding for content area
transitionDurationnumber0.3Animation duration in seconds
sidebarCollapsedbooleanfalseWhether sidebar is initially collapsed
onSidebarToggle(isOpen: boolean) => voidundefinedCallback for sidebar toggle
zIndexobject{ header: 100, sidebar: 90, footer: 50, overlay: 80 }Z-index values for each layer
classNamestringundefinedAdditional CSS classes

Advanced Configuration

Custom Z-Index Management

function CustomZIndexExample() {
return (
<HeaderLayout
zIndex={{
header: 200,
sidebar: 150,
footer: 100,
overlay: 180
}}
>
{/* Content */}
</HeaderLayout>
);
}