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>
childrenColumn contents.
React.ReactNodebaseDefault 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:
012345678910111212aboveSmallWidth 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:
0123456789101112aboveMediumWidth 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:
0123456789101112aboveLargeWidth 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:
0123456789101112dataTestIdA selector hook into the React component for use in automated testing environments.
stringdataTestA selector hook into the React component for use in automated testing environments.
Note: Deprecated in favor of the `dataTestId` prop
stringchildrenGrid contents.
React.ReactNodegutterControls the amount of space between columns in the grid.
This prop can be one of the following 3 types:
'normal''wide''flush''normal'dataTestIdA selector hook into the React component for use in automated testing environments.
stringdataTestA selector hook into the React component for use in automated testing environments.
Note: Deprecated in favor of the `dataTestId` prop
string