Skip to main content
Version: 1.0.5

GridItem

@spartanfx/react v1.0.5


@spartanfx/react / GridItem

Variable: GridItem

const GridItem: React.FunctionComponent<IGridItemProps>

GridItem is a child layout component meant to be used inside a Grid. It controls how many columns and/or rows a child should span in the CSS grid.

Example

<Grid cols={3}>
<GridItem colSpan={2}>
<div>This cell spans 2 columns</div>
</GridItem>
<GridItem>
<div>Normal 1-column cell</div>
</GridItem>
<GridItem rowSpan={2}>
<div>This cell spans 2 rows</div>
</GridItem>
</Grid>