Save 15% on all Justd Blocks
Components

Grid

A responsive layout system that organizes content into rows and columns, ensuring a seamless and adaptive user experience.

beta

Basic

Grid's your go-to layout wizard, making it a breeze to whip up responsive and slick layouts. Whether it's jazzing up your blog, showcasing your portfolio, or rocking a landing page, this component keeps everything neat and stylish on any device.

Loading...

Installation

If you hit any issues, make sure you check out the installation guide here for more information.

Manual Installation

Make sure you also install the composed components and the required packages for the component to function properly.

Anatomy

Responsive

Grid's responsiveness is a breeze, with the ability to define your columns and gaps for any screen size. Whether you're designing for mobile, tablet, or desktop, Grid ensures that your content looks great on all devices.

This grid ain't got no default variants, so if you don't set an initial value, it's a big fat nothing. When you're setting up a responsive prop like sm or md, make sure to slap an initial value for the breakpoint.

Loading...

Gaps

Grid's gaps are configurable, allowing you to define the space between each item. Whether you're designing for mobile, tablet, or desktop, Grid ensures that your content looks great on all devices.

Loading...

Gaps X and Y

Sometimes you need make diffrent gaps for the x and y axis. Grid's gapX and gapY props allow you to do just that.

Loading...

Debugging

Sometimes you need to know what's going on in your grid. Grid has a debug prop that will add a border around each item.

Loading...

Grid Item

Grid Item is the component that makes up the grid. It's a wrapper around the ListBoxItem component from react-aria-components. Grid Item has all the same props as ListBoxItem, but with a few extra props to help you define column and row spans.

Loading...

I use that vibe on the Components page, where you can catch the link to the component's docs. What's the next step?

Props

Aight, just a heads up, all them props got that responsive mojo. You can tweak the prop for each breakpoint like a boss.

Grid

These props let you tweak the grid to your vibe.

PropertyType
columnsstring | number | object
gapnumber | object
gapXnumber | object
gapYnumber | object
autoRows'auto' | 'min' | 'max' | 'fr'
autoColumns'auto' | 'min' | 'max' | 'fr'
flow'row' | 'col' | 'rowDense' | 'colDense' | 'dense'
rowsnumber | object
debugboolean

GridItem

Props like colSpan, rowSpan, colStart, colEnd, rowStart, and rowEnd let you position grid items exactly where you want 'em in the grid layout.

PropertyType
colSpanstring | number | object
rowSpanstring | number | object
colStartstring | number | object
colEndstring | number | object
rowStartstring | number | object
rowEndstring | number | object
orderstring | number | object