Auto Grid
Responsive CSS Grid with auto-fit / auto-fill minmax repeat tracks with zero media queries.
Interactive Specification & Studio
High-Throughput Kinetic Pipeline
Automated repeat tracks expanding fluidly to consume available viewport space with zero layout thrash.
Dynamic MinMax Constraint Engine
Evaluates minmax(min(100%, 280px), 1fr) to guarantee zero mobile horizontal scroll overflow.
Sub-Pixel Layout Stability
Fractional unit distribution across browser render passes preventing cumulative layout shift (CLS = 0.00).
Hermite Damped Track Transition
Column wrapping transitions with fluid visual hierarchy and balanced element distribution.
Cross-Ecosystem Universal Grid
Zero-runtime pure CSS grid templates compiled for Vue, Svelte, Angular, Solid, and modern web frameworks.
Zero Memory Leak Architecture
Stateless declarative container avoiding persistent listener references or uncollected DOM observers.
Quick Start & Consumer Example
Copy-paste ready implementation for React (.tsx). Automatically updates when you modify parameters in the Workbench above.
import React from 'react';
import { AutoGrid, AutoGridItem } from '@/components/ui/AutoGrid';
const ITEMS = [
{ id: '01', tag: 'PIPELINE', title: 'High-Throughput Kinetic Pipeline', desc: 'Automated repeat tracks expanding fluidly with zero layout thrashing.', metric: '0.14ms Frame' },
{ id: '02', tag: 'COMPLIANCE', title: 'Dynamic MinMax Constraint Engine', desc: 'Evaluates minmax(min(100%, 280px), 1fr) for zero horizontal scroll overflow.', metric: '280px Floor' },
{ id: '03', tag: 'VITALS', title: 'Sub-Pixel Layout Stability', desc: 'Fractional unit distribution across render passes (CLS = 0.00).', metric: 'CLS: 0.00' },
{ id: '04', tag: 'PHYSICS', title: 'Hermite Damped Track Transition', desc: 'Column wrapping transitions with fluid visual hierarchy and balanced element distribution.', metric: 'Hermite Smooth' },
{ id: '05', tag: 'UNIVERSAL', title: 'Cross-Ecosystem Universal Grid', desc: 'Zero-runtime pure CSS grid templates compiled for Vue, Svelte, Angular, Solid, and modern web frameworks.', metric: '13 Flavors' },
{ id: '06', tag: 'AUDIT', title: 'Zero Memory Leak Architecture', desc: 'Stateless declarative container avoiding persistent listener references.', metric: '0 Heap Leaks' },
];
export function AutoGridDemo() {
return (
<section className="p-8 bg-background text-foreground">
<AutoGrid
minItemWidth={280}
gap={24}
mode="auto-fit"
maxColumns={4}
alignItems="stretch"
className="max-w-6xl mx-auto"
>
{ITEMS.map((item) => (
<AutoGridItem key={item.id}>
<div className="h-full rounded-2xl border border-border/80 bg-card p-6 shadow-xs flex flex-col justify-between">
<div>
<span className="text-3xs font-mono font-bold text-primary">{item.tag}</span>
<h3 className="font-bold text-base mt-2">{item.title}</h3>
<p className="text-muted-foreground text-xs mt-2">{item.desc}</p>
</div>
<div className="mt-4 pt-3 border-t border-border/40 flex justify-between text-3xs font-mono">
<span>GRID #{item.id}</span>
<span className="text-emerald-400 font-bold">{item.metric}</span>
</div>
</div>
</AutoGridItem>
))}
</AutoGrid>
</section>
);
}
Props & Configuration
Exhaustive parameter contract for Auto Grid. Validated in the live Studio workbench above and statically checked across all 13 ecosystem templates.
| Prop | Type | Default | Description |
|---|---|---|---|
minItemWidth | number | 280 | Minimum width of each grid column before wrapping to the next line. |
gap | number | 24 | Gap between grid items. |
mode | select | auto-fit | Determines whether tracks collapse to stretch items or stay fixed. |
maxColumns | number | 4 | Upper constraint on maximum columns allowed. |
alignItems | select | stretch | Cross-axis vertical alignment for items within grid rows. |
Minimum width of each grid column before wrapping to the next line.
Gap between grid items.
Determines whether tracks collapse to stretch items or stay fixed.
Upper constraint on maximum columns allowed.
Cross-axis vertical alignment for items within grid rows.
Component Source
Component source definition for React (.tsx). Toggle between the clean wrapper and the standalone ejected engine micro-kernel.
import * as React from 'react';
import * as AutoGridPrimitive from '@exhuma/core';
import { clsx } from 'clsx';
export interface AutoGridProps extends React.ComponentPropsWithoutRef<typeof AutoGridPrimitive.AutoGrid> {
className?: string;
}
export const AutoGrid = React.forwardRef<HTMLDivElement, AutoGridProps>(
({ className, children, ...props }, ref) => (
<AutoGridPrimitive.AutoGrid
ref={ref}
className={clsx(
'grid grid-cols-[repeat(auto-fill,minmax(min(100%,280px),1fr))] gap-6 w-full',
className
)}
{...props}
>
{children}
</AutoGridPrimitive.AutoGrid>
)
);
AutoGrid.displayName = 'AutoGrid';
export const AutoGridItem = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
({ className, children, ...props }, ref) => (
<AutoGridPrimitive.AutoGridItem
ref={ref}
className={clsx('', className)}
{...props}
>
{children}
</AutoGridPrimitive.AutoGridItem>
)
);
AutoGridItem.displayName = 'AutoGridItem';
Lifecycle Safety & Performance
Engineered for high-frequency user interactions with zero memory leaks.
Deterministic Cleanup
GPU Compositor Acceleration
will-change: transform without triggering browser layout recalculations.Accessibility Considerations
Fully compliant with WCAG guidelines and respects user motion preferences.
prefers-reduced-motion Support
prefers-reduced-motion: reduce enabled in their operating system, Exhuma components automatically disable 3D gyroscope tilt and spring animations, rendering static accessible content.