Grid
1
2
3
4
1
2
3
4
1
2
3
4
5
6
7
8
Markup
<Grid
class="one"
templateRows="100px auto"
templateColumns="200px 1fr 2fr">
<div style="grid-column: span 3;">1</div>
<div>2</div>
<div>3</div>
<div>4</div>
</Grid>
<Grid
class="two"
templateColumns="repeat(auto-fit, minmax(180px, 1fr)">
<div>...</div>
</Grid>
<Grid
class="three"
templateColumns="repeat(6, 1fr)">
<div style="grid-column: span 3;">1</div>
<div style="grid-column: span 2;">2</div>
<div>3</div>
<div style="grid-column: span 2;">4</div>
<div>5</div>
<div>6</div>
<div>7</div>
<div>8</div>
</Grid>
Props
Title | Value |
---|---|
class | string |
density | "tight" | "loose" |
alignItems | 'normal' | valid css for 'align-items' |
justifyItems | 'normal' | valid css for 'justify-items' |
templateColumns | '1fr' | valid css for 'grid-template-columns' |
templateRows | 'auto' | valid css for 'grid-template-rows' |