Dashboard Grid
A responsive grid layout for dashboard cards and widgets. Built using Grid and Box components with auto-fit columns.
Total Users12,345
Revenue$54,321
Active Sessions1,234
Conversion Rate3.2%
Source
'use client';
import { Box, Grid } from '@umami/react-zen';
export function DashboardGrid({ children, ...props }) {
return (
<Grid columns="repeat(auto-fit, minmax(280px, 1fr))" gap="4" {...props}>
{children}
</Grid>
);
}
export function DashboardCard({ children, ...props }) {
return (
<Box
padding="4"
backgroundColor="surface-raised"
borderRadius="lg"
border
borderColor="muted"
{...props}
>
{children}
</Box>
);
}
export function DashboardCardWide({ children, ...props }) {
return (
<Box
padding="4"
backgroundColor="surface-raised"
borderRadius="lg"
border
borderColor="muted"
style={{ gridColumn: 'span 2' }}
{...props}
>
{children}
</Box>
);
}
export function DashboardCardFull({ children, ...props }) {
return (
<Box
padding="4"
backgroundColor="surface-raised"
borderRadius="lg"
border
borderColor="muted"
style={{ gridColumn: '1 / -1' }}
{...props}
>
{children}
</Box>
);
}Variations
With wide card
Users12,345
Revenue$54,321
Activity Chart
With full-width card
Metric 11,234
Metric 25,678
Metric 39,012
Recent Activity
With icons
Total Users12,345
+12%
Revenue$54,321
+8%