Aggarly Platform Grid provides an enterprise-grade, token-driven layout system with 12-column layouts, responsive spans, premium auto-fit card grids, and robust alignment controls for complex admin + clinical workflows.
The standard enterprise layout: spans across a 12-column grid with token gaps.
import { Grid, GridCol } from "@/design-system/components/Grid";
export function Example() {
return (
<Grid cols={12} gap={3}>
<GridCol span={12}><div className="ds-grid-demo">span=12</div></GridCol>
<GridCol span={6}><div className="ds-grid-demo">span=6</div></GridCol>
<GridCol span={6}><div className="ds-grid-demo">span=6</div></GridCol>
<GridCol span={4}><div className="ds-grid-demo">span=4</div></GridCol>
<GridCol span={4}><div className="ds-grid-demo">span=4</div></GridCol>
<GridCol span={4}><div className="ds-grid-demo">span=4</div></GridCol>
</Grid>
);
}
Use spanSm/spanMd/spanLg/spanXl/span2xl for adaptive layouts.
import { Grid, GridCol } from "@/design-system/components/Grid";
export function Example() {
return (
<Grid cols={12} gap={3}>
<GridCol span={12} spanMd={6} spanLg={4}>
<div className="ds-grid-demo">12 / md:6 / lg:4</div>
</GridCol>
<GridCol span={12} spanMd={6} spanLg={4}>
<div className="ds-grid-demo">12 / md:6 / lg:4</div>
</GridCol>
<GridCol span={12} spanMd={12} spanLg={4}>
<div className="ds-grid-demo">12 / md:12 / lg:4</div>
</GridCol>
</Grid>
);
}
Premium pattern for dashboards: auto-fit columns with minWidth + optional equal-height cards.
import { Grid, GridCol } from "@/design-system/components/Grid";
export function Example() {
return (
<Grid auto minWidth={240} gap={3} equal>
<GridCol><div className="ds-grid-demo ds-grid-demo--primary">Card</div></GridCol>
<GridCol><div className="ds-grid-demo ds-grid-demo--primary">Card</div></GridCol>
<GridCol><div className="ds-grid-demo ds-grid-demo--primary">Card</div></GridCol>
<GridCol><div className="ds-grid-demo ds-grid-demo--primary">Card</div></GridCol>
</Grid>
);
}
Control items alignment and justify behavior at the grid container level.
import { Grid, GridCol } from "@/design-system/components/Grid";
export function Example() {
return (
<Grid cols={12} gap={3} itemsAlign="center" itemsJustify="stretch">
<GridCol span={4}><div className="ds-grid-demo ds-grid-demo--taller">Tall</div></GridCol>
<GridCol span={4}><div className="ds-grid-demo">Normal</div></GridCol>
<GridCol span={4}><div className="ds-grid-demo ds-grid-demo--tall">Medium</div></GridCol>
</Grid>
);
}
Use the DS container to constrain content width consistently across pages.
import { Container, Grid, GridCol } from "@/design-system/components/Grid";