Grid
Container element to arrange items on a page and create a responsive layout.
1
2
3
- React
- CSS
<Grid gap={2}>
<Grid></Grid>
<Grid></Grid>
<Grid></Grid>
</Grid>
<div class="flex gap-2">
<div class="flex"></div>
<div class="flex"></div>
<div class="flex"></div>
</div>
Props
Wrap
Make all child elements automatically the same width.
1
2
3
- React
- CSS
<Grid wrap></Grid>
<div class="flex flex-wrap"></div>
Direction
This prop overrides the flex-direction
value of the component.
direction='column'
1
2
3
direction='columnReverse'
1
2
3
direction='row'
1
2
3
direction='rowReverse'
1
2
3
- React
- CSS
<Grid direction="column"></Grid>
<Grid direction="columnReverse"></Grid>
<Grid direction="row"></Grid>
<Grid direction="rowReverse"></Grid>
<div class="flex direction-column"></div>
<div class="flex direction-columnReverse"></div>
<div class="flex direction-row"></div>
<div class="flex direction-rowReverse"></div>
Justify
This prop overrides the justify-content
value of the component.
justify='center'
1
2
3
justify='end'
1
2
3
justify='start'
1
2
3
justify='spaceAround'
1
2
3
justify='spaceBetween'
1
2
3
justify='spaceEvenly'
1
2
3
- React
- CSS
<Grid justify="center"></Grid>
<Grid justify="end"></Grid>
<Grid justify="start"></Grid>
<Grid justify="spaceAround"></Grid>
<Grid justify="spaceBetween"></Grid>
<Grid justify="spaceEvenly"></Grid>
<div class="flex justify-center"></div>
<div class="flex justify-end"></div>
<div class="flex justify-start"></div>
<div class="flex justify-spaceAround"></div>
<div class="flex justify-spaceBetween"></div>
<div class="flex justify-spaceEvenly"></div>
AlignItems
This prop overrides the align-items
value of the component.
items='stretch'
1
2
3
items='center'
1
2
3
items='end'
1
2
3
items='start'
1
2
3
items='baseline'
1
2
3
- React
- CSS
<Grids="stretch"></Grid>
<Grids="center"></Grid>
<Grids="end"></Grid>
<Grids="start"></Grid>
<Grids="baseline"></Grid>
<div class="flex items-stretch"></div>
<div class="flex items-center"></div>
<div class="flex items-end"></div>
<div class="flex items-start"></div>
<div class="flex items-baseline"></div>
AlignSelf
This prop overrides the align-self
value of the component.
self='stretch'
Stretch
self='center'
Center
self='end'
End
self='start'
Start
self='baseline'
Baseline
- React
- CSS
<Grid self="stretch"></Grid>
<Grid self="center"></Grid>
<Grid self="end"></Grid>
<Grid self="start"></Grid>
<Grid self="baseline"></Grid>
<div class="flex self-stretch"></div>
<div class="flex self-center"></div>
<div class="flex self-end"></div>
<div class="flex self-start"></div>
<div class="flex self-baseline"></div>
Gap
gap={1}
1
2
3
gap={2}
1
2
3
gap={3}
1
2
3
gap={4}
1
2
3
gap={5}
1
2
3
gap={6}
1
2
3
gap={7}
1
2
3
gap={8}
1
2
3
gap={9}
1
2
3
gap={10}
1
2
3
gap={11}
1
2
3
gap={12}
1
2
3
- React
- CSS
<Grid gap={1}></Grid>
<Grid gap={2}></Grid>
<Grid gap={3}></Grid>
<Grid gap={4}></Grid>
<Grid gap={5}></Grid>
<Grid gap={6}></Grid>
<Grid gap={7}></Grid>
<Grid gap={8}></Grid>
<Grid gap={9}></Grid>
<Grid gap={10}></Grid>
<Grid gap={11}></Grid>
<Grid gap={12}></Grid>
<div class="flex gap-1"></div>
<div class="flex gap-2"></div>
<div class="flex gap-3"></div>
<div class="flex gap-4"></div>
<div class="flex gap-5"></div>
<div class="flex gap-6"></div>
<div class="flex gap-7"></div>
<div class="flex gap-8"></div>
<div class="flex gap-9"></div>
<div class="flex gap-10"></div>
<div class="flex gap-11"></div>
<div class="flex gap-12"></div>
Col
Define the default width, based on a 12 column grid.
1
2
3
4
5
6
7
8
9
10
11
12
- React
- CSS
<Grid col={1}></Grid>
<Grid col={2}></Grid>
<Grid col={3}></Grid>
<Grid col={4}></Grid>
<Grid col={5}></Grid>
<Grid col={6}></Grid>
<Grid col={7}></Grid>
<Grid col={8}></Grid>
<Grid col={9}></Grid>
<Grid col={10}></Grid>
<Grid col={11}></Grid>
<Grid col={12}></Grid>
<div class="flex col-1"></div>
<div class="flex col-2"></div>
<div class="flex col-3"></div>
<div class="flex col-4"></div>
<div class="flex col-5"></div>
<div class="flex col-6"></div>
<div class="flex col-7"></div>
<div class="flex col-8"></div>
<div class="flex col-9"></div>
<div class="flex col-10"></div>
<div class="flex col-11"></div>
<div class="flex col-12"></div>
Colxs
1
2
3
4
5
6
7
8
9
10
11
12
- React
- CSS
<Grid colxs={1}></Grid>
<Grid colxs={2}></Grid>
<Grid colxs={3}></Grid>
<Grid colxs={4}></Grid>
<Grid colxs={5}></Grid>
<Grid colxs={6}></Grid>
<Grid colxs={7}></Grid>
<Grid colxs={8}></Grid>
<Grid colxs={9}></Grid>
<Grid colxs={10}></Grid>
<Grid colxs={11}></Grid>
<Grid colxs={12}></Grid>
<div class="flex col-xs-1"></div>
<div class="flex col-xs-2"></div>
<div class="flex col-xs-3"></div>
<div class="flex col-xs-4"></div>
<div class="flex col-xs-5"></div>
<div class="flex col-xs-6"></div>
<div class="flex col-xs-7"></div>
<div class="flex col-xs-8"></div>
<div class="flex col-xs-9"></div>
<div class="flex col-xs-10"></div>
<div class="flex col-xs-11"></div>
<div class="flex col-xs-12"></div>
Colsm
1
2
3
4
5
6
7
8
9
10
11
12
- React
- CSS
<Grid colsm={1}></Grid>
<Grid colsm={2}></Grid>
<Grid colsm={3}></Grid>
<Grid colsm={4}></Grid>
<Grid colsm={5}></Grid>
<Grid colsm={6}></Grid>
<Grid colsm={7}></Grid>
<Grid colsm={8}></Grid>
<Grid colsm={9}></Grid>
<Grid colsm={10}></Grid>
<Grid colsm={11}></Grid>
<Grid colsm={12}></Grid>
<div class="flex col-sm-1"></div>
<div class="flex col-sm-2"></div>
<div class="flex col-sm-3"></div>
<div class="flex col-sm-4"></div>
<div class="flex col-sm-5"></div>
<div class="flex col-sm-6"></div>
<div class="flex col-sm-7"></div>
<div class="flex col-sm-8"></div>
<div class="flex col-sm-9"></div>
<div class="flex col-sm-10"></div>
<div class="flex col-sm-11"></div>
<div class="flex col-sm-12"></div>
Colmd
1
2
3
4
5
6
7
8
9
10
11
12
- React
- CSS
<Grid colmd={1}></Grid>
<Grid colmd={2}></Grid>
<Grid colmd={3}></Grid>
<Grid colmd={4}></Grid>
<Grid colmd={5}></Grid>
<Grid colmd={6}></Grid>
<Grid colmd={7}></Grid>
<Grid colmd={8}></Grid>
<Grid colmd={9}></Grid>
<Grid colmd={10}></Grid>
<Grid colmd={11}></Grid>
<Grid colmd={12}></Grid>
<<div class="flex col-md-1"></div>
<<div class="flex col-md-2"></div>
<<div class="flex col-md-3"></div>
<<div class="flex col-md-4"></div>
<<div class="flex col-md-5"></div>
<<div class="flex col-md-6"></div>
<<div class="flex col-md-7"></div>
<<div class="flex col-md-8"></div>
<<div class="flex col-md-9"></div>
<<div class="flex col-md-10"></div>
<<div class="flex col-md-11"></div>
<<div class="flex col-md-12"></div>
Collg
1
2
3
4
5
6
7
8
9
10
11
12
- React
- CSS
<Grid collg={1}></Grid>
<Grid collg={2}></Grid>
<Grid collg={3}></Grid>
<Grid collg={4}></Grid>
<Grid collg={5}></Grid>
<Grid collg={6}></Grid>
<Grid collg={7}></Grid>
<Grid collg={8}></Grid>
<Grid collg={9}></Grid>
<Grid collg={10}></Grid>
<Grid collg={11}></Grid>
<Grid collg={12}></Grid>
<div class="flex col-lg-1"></div>
<div class="flex col-lg-2"></div>
<div class="flex col-lg-3"></div>
<div class="flex col-lg-4"></div>
<div class="flex col-lg-5"></div>
<div class="flex col-lg-6"></div>
<div class="flex col-lg-7"></div>
<div class="flex col-lg-8"></div>
<div class="flex col-lg-9"></div>
<div class="flex col-lg-10"></div>
<div class="flex col-lg-11"></div>
<div class="flex col-lg-12"></div>
Colxl
1
2
3
4
5
6
7
8
9
10
11
12
- React
- CSS
<Grid colxl={1}></Grid>
<Grid colxl={2}></Grid>
<Grid colxl={3}></Grid>
<Grid colxl={4}></Grid>
<Grid colxl={5}></Grid>
<Grid colxl={6}></Grid>
<Grid colxl={7}></Grid>
<Grid colxl={8}></Grid>
<Grid colxl={9}></Grid>
<Grid colxl={10}></Grid>
<Grid colxl={11}></Grid>
<Grid colxl={12}></Grid>
<div class="flex col-xl-1"></div>
<div class="flex col-xl-2"></div>
<div class="flex col-xl-3"></div>
<div class="flex col-xl-4"></div>
<div class="flex col-xl-5"></div>
<div class="flex col-xl-6"></div>
<div class="flex col-xl-7"></div>
<div class="flex col-xl-8"></div>
<div class="flex col-xl-9"></div>
<div class="flex col-xl-10"></div>
<div class="flex col-xl-11"></div>
<div class="flex col-xl-12"></div>