• /
  • Log in

GridItem

Child element of the <Grid> component.

By default it spans one column but you can specify the number of columns that it should span by setting the columnSpan or the columnStart and columnEnd props.

Usage

import { GridItem } from 'nr1'

Props

childrenrequirednode

Content to render inside the grid item.

classNamestring

Appends class names to the component.

Should be used only for positioning and spacing purposes.

collapseGapAfterboolean
DEFAULT
false

If true, the grid item will fill the following column gap set by the grid.

collapseGapBeforeboolean
DEFAULT
false

If true, the grid item will fill the preceding column gap set by the grid.

columnEndnumber

Determines the grid item's end column within the grid.

Possible values: integer between 1 and 12.

columnSpannumber

Determines across how many columns the grid item should span, starting from the provided columnStart. This prop should be used as an alternative to columnEnd. If both of them are provided, only the columnEnd will be considered.

Possible values: integer between 1 and 12.

columnStartnumber

Determines the grid item's start column within the grid.

Possible values: integer between 1 and 12.

styleobject

Inline style for custom styling.

testIdstring

Adds a data-test-id attribute.

Use it to target the component in unit and e2e tests.

Create issueEdit page
Copyright © 2021 New Relic Inc.