Skip to content

CSS Subgrid compatibility in Chakra UI Grid component #8065

Answered by moeriki
veloware asked this question in Q&A
Discussion options

You must be logged in to vote

It works OOTB. Just remember subgrid should be nested directly under its parent grid. So you can't use the GridItem component inside the parent.

<Grid>
	<Grid gridRow="span 2" templateRows="subgrid">
		<GridItem>1</GridItem>
		<GridItem>2</GridItem>
	</Grid>
	<Grid gridRow="span 2" templateRows="subgrid">
		<GridItem>1</GridItem>
		<GridItem>2</GridItem>
	</Grid>
</Grid>

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by veloware
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants