Components
Responsive layouts, automatically aligned.
Version: | 14.18.2 •View source•Changelog•Report issue | |
---|---|---|
Install: | yarn add @thumbtack/thumbprint-react | |
Import: | import { GridColumn, Grid } from '@thumbtack/thumbprint-react'; |
Using multiple columns with a combined width that exceeds 12
will automatically wrap into new rows. In this example the columns are stacked by default, two per row above the small breakpoint, and three per row above the medium breakpoint.
You can set a column width to 0
to hide it entirely at certain breakpoints
The Grid
component should not be used for centered single-column grids. This can be built with Atomic classes: mw7 center tc
.
<div class="mw7 center tc"><div class="ba b-green">“In our industry, you hear a lot of talk about the future of work. What I’ve come to believe— because I see it every day — is that the entrepreneurial spirit of independentprofessionals is the most precious resource we have as a society.”</div></div>
children
Column contents.
React.ReactNode
base
Default width of the column as a fraction of the grid out of 12, to be shown at all breakpoints except those covered by the three optional props below.
This prop can be one of the following 13 types:
0
1
2
3
4
5
6
7
8
9
10
11
12
12
aboveSmall
Width of the column as a fraction of the grid out of 12, to be shown in viewports wider
than small
.
This prop can be one of the following 13 types:
0
1
2
3
4
5
6
7
8
9
10
11
12
aboveMedium
Width of the column as a fraction of the grid out of 12, to be shown in viewports wider
than medium
.
This prop can be one of the following 13 types:
0
1
2
3
4
5
6
7
8
9
10
11
12
aboveLarge
Width of the column as a fraction of the grid out of 12, to be shown in viewports wider
than large
.
This prop can be one of the following 13 types:
0
1
2
3
4
5
6
7
8
9
10
11
12
dataTestId
A selector hook into the React component for use in automated testing environments.
string
dataTest
A selector hook into the React component for use in automated testing environments.
Note: Deprecated in favor of the `dataTestId` prop
string
children
Grid contents.
React.ReactNode
gutter
Controls the amount of space between columns in the grid.
This prop can be one of the following 3 types:
'normal'
'wide'
'flush'
'normal'
dataTestId
A selector hook into the React component for use in automated testing environments.
string
dataTest
A selector hook into the React component for use in automated testing environments.
Note: Deprecated in favor of the `dataTestId` prop
string