This library is still in development and is available only for internal usage at VTEX.
Skip to main content

Grid

Version: 0.131.0

Grid

Grid is a Box with display: grid and it comes with helpful styles shorthand.

Import

import { Grid, GridItem } from '@vtex/admin-ui'

Behavior

Loading...

Composition

NameDescriptionProps
GridThe main wrapper with display: grid and helpful styles shorthandGridProps
GridItemUsed as a child of Grid to control the gridArea position whithin the gridGridItemProps

Features

Template Areas

Example of using grid template areas and applying a gap or space between the items.

Loading...

Template Columns

Example of using grid template columns and applying a gap or space between the columns.

Loading...

Template Rows

Example of using grid template rows and applying a gap or space between the rows.

Loading...

Props

Grid

You can use all the props accepted by the JSX element you defined with as, which is div by default. And also, the props that mirror the types of grid styles:

NameShorthand for
gapgridGap
rowGapgridRowGap
columnGapgridColumnGap
templateAreasgridTemplateAreas
templateRowsgridTemplateRows
templateColumnsgridTemplateColumns

GridItem

You can use all the props accepted by the JSX element you defined with as, which is div by default. And also, the props that have the same type of grid styles:

NameShorthand for
areagridArea