Collection of theme-ui and external components.
created:3/15/2021
updated:3/15/2021
source lines:31
comments %:0

Grid

CSS grid layout component to arrange direct child elements in a tiled grid layout.

Columns

Box
Box
Box
Box

({
gap,
col1,
col3,
}) => (
<Grid gap={gap} columns={[col1, null, col3]}>
<Box sx={{ bg: 'primary', color: 'white' }}>Box</Box>
<Box sx={{ bg: 'muted' }}>Box</Box>
<Box sx={{ bg: 'primary', color: 'white' }}>Box</Box>
<Box sx={{ bg: 'muted' }}>Box</Box>
</Grid>
)

Controls

Name
Description
Default
Controls
- (2 properties)
col1

number of (equally-sized) columns in first position

number
2
col3

number of (equally-sized) columns in third position

number
4
GridProps (1 properties)

A11y tests

Box
Box
Box
Box

color

+1 rules100

Viewport

Box
Box
Box
Box
320px

Box
Box
Box
Box
375px

Box
Box
Box
Box
768px

Box
Box
Box
Box
1024px