Grid

CSS Grid utility component with preset column and gap configurations. Simplifies common grid layouts without writing custom grid classes.

Column Counts

Preview

2 columns

1
2

3 columns

1
2
3

4 columns

1
2
3
4

Gap Sizes

Preview

gap="none"

1
2
3

gap="sm"

1
2
3

gap="lg"

1
2
3

gap="xl"

1
2
3

Props

PropTypeDefaultDescription
cols1 | 2 | 3 | 4 | 5 | 6 | 121Number of grid columns.
gap"none" | "sm" | "md" | "lg" | "xl""md"Spacing between grid items.
classNamestring-Additional CSS classes.

Accessibility

  • Renders a semantic <div> with CSS Grid layout
  • Supports ref forwarding for DOM access
  • Passes through all standard HTML attributes including aria-* and role
  • Grid items maintain their DOM reading order for screen readers