In the grid system, we define the frame outside the information area based on row and column, to ensure that every area can have stable arrangement.
2
const PlaceHolder = ({ children }) => (
3
<div style={{ height: '50px', textAlign: 'center', background: 'papayawhip' }}>{children}</div>
8
<PlaceHolder>col-4</PlaceHolder>
11
<PlaceHolder>col-4</PlaceHolder>
14
<PlaceHolder>col-4</PlaceHolder>
You can use an array to set vertical spacing, [horizontal, vertical]
2
const PlaceHolder = ({ children }) => (
3
<div style={{ height: '50px', textAlign: 'center', background: 'papayawhip' }}>{children}</div>
6
<Row gutter={[50, 20]}>
8
<PlaceHolder>col-4</PlaceHolder>
11
<PlaceHolder>col-4</PlaceHolder>
14
<PlaceHolder>col-4</PlaceHolder>
The default grid number of the grid system is 12. When there is no custom grid number and one row exceeds 12, the remaining grids will be arranged in a new row.
2
const PlaceHolder = ({ children }) => (
3
<div style={{ height: '50px', textAlign: 'center', background: 'papayawhip' }}>{children}</div>
6
<Row gutter={[20, 50]}>
8
<PlaceHolder>col-4</PlaceHolder>
11
<PlaceHolder>col-4</PlaceHolder>
14
<PlaceHolder>col-4</PlaceHolder>
17
<PlaceHolder>col-4</PlaceHolder>
Grid adaptive width.When the number of grids in a row exceeds 12,the remaining grids occupy one row.
2
const PlaceHolder = ({ children }) => (
3
<div style={{ height: '50px', textAlign: 'center', background: 'papayawhip' }}>{children}</div>
8
<PlaceHolder>col-4</PlaceHolder>
11
<PlaceHolder>col-4</PlaceHolder>
14
<PlaceHolder>col-4</PlaceHolder>
17
<PlaceHolder>col-4</PlaceHolder>
Set offset of Col components.
2
const PlaceHolder = ({ children }) => (
3
<div style={{ height: '50px', textAlign: 'center', background: 'papayawhip' }}>{children}</div>
8
<PlaceHolder>col-3</PlaceHolder>
11
<PlaceHolder>col-3</PlaceHolder>
13
<Col span={3} offset={3}>
14
<PlaceHolder>col-3</PlaceHolder>
The default is 12 grids system.You can customize the number of grids by setting columns for the Row Component.
2
const PlaceHolder = ({ children }) => (
3
<div style={{ height: '50px', textAlign: 'center', background: 'papayawhip' }}>{children}</div>
8
<PlaceHolder>col-12</PlaceHolder>
11
<PlaceHolder>col-6</PlaceHolder>
14
<PlaceHolder>col-6</PlaceHolder>