Use as a positioned cell within a Grid layout.
q2-grid-area component(s) should always comprise the immediate children elements of a q2-grid component.
Slotted text content may inherit the alignment properties of the grid or grid area components, resulting in unexpected text alignment outcomes. To prevent this from occurring, use flebox or text-align properties within your slotted content's styling to control this behavior.
If you use the column-span attribute to span more columns than are available in the grid, the parent q2-grid component will automatically add additional columns to accommodate the q2-grid-area component. This behavior is intentional and allows for flexible grid layouts.
NOTE: While the amount of columns and rows you can examine in the code examples has been limited, q2-grid supports any number of columns and rows! The colored cells in the live example are styled for visual clarity only; that styling is intentionally excluded from the copied code snippet so you can copy the grid structure cleanly and apply your own styles.
alignSets the vertical alignment behavior of the q2-grid-area component within its grid track at the baseline viewport size.
When set to auto, the grid area will inherit this property from the parent q2-grid component.
columnSpancolumn-spanSets the column span amount of the grid area at the baseline viewport size.
columnStartcolumn-startSets the starting column of the grid area at the baseline viewport size.
justifySets the horizontal alignment behavior of the q2-grid-area component within its grid track at the baseline viewport size.
When set to auto, the grid area will inherit this property from the parent q2-grid component.
lgAlignlg-alignSets the vertical alignment behavior of the q2-grid-area component within its grid track at the baseline viewport size.
When set to auto, the grid area will inherit this property from the parent q2-grid component.
lgColumnSpanlg-column-spanSets the column span amount of the grid area at the LG viewport size.
lgColumnStartlg-column-startSets the starting column of the grid area at the LG viewport size.
When set to auto, the grid area will automatically start at the first available column.
lgJustifylg-justifySets the horizontal alignment behavior of the q2-grid-area component within its grid track at the baseline viewport size.
When set to auto, the grid area will inherit this property from the parent q2-grid component.
lgRowSpanlg-row-spanSets the row span amount of the grid area at the LG viewport size.
lgRowStartlg-row-startSets the starting row of the grid area at the LG viewport size.
When set to auto, the grid area will automatically start at the first available row.
lgZIndexlg-z-indexSets the z-index of the grid area at the LG viewport size.
mdAlignmd-alignSets the vertical alignment behavior of the q2-grid-area component within its grid track at the baseline viewport size.
When set to auto, the grid area will inherit this property from the parent q2-grid component.
mdColumnSpanmd-column-spanSets the column span amount of the grid area at the MD viewport size.
mdColumnStartmd-column-startSets the starting column of the grid area at the MD viewport size.
When set to auto, the grid area will automatically start at the first available column.
mdJustifymd-justifySets the horizontal alignment behavior of the q2-grid-area component within its grid track at the baseline viewport size.
When set to auto, the grid area will inherit this property from the parent q2-grid component.
mdRowSpanmd-row-spanSets the row span amount of the grid area at the MD viewport size.
mdRowStartmd-row-startSets the starting row of the grid area at the MD viewport size.
When set to auto, the grid area will automatically start at the first available row.
mdZIndexmd-z-indexSets the z-index of the grid area at the MD viewport size.
rowSpanrow-spanSets the row span amount of the grid area at the baseline viewport size.
rowStartrow-startSets the starting row of the grid area at the baseline viewport size.
When set to auto, the grid area will automatically start at the first available row.
smAlignsm-alignSets the vertical alignment behavior of the q2-grid-area component within its grid track at the baseline viewport size.
When set to auto, the grid area will inherit this property from the parent q2-grid component.
smColumnSpansm-column-spanSets the column span amount of the grid area at the SM viewport size.
smColumnStartsm-column-startSets the starting column of the grid area at the SM viewport size.
When set to auto, the grid area will automatically start at the first available column.
smJustifysm-justifySets the horizontal alignment behavior of the q2-grid-area component within its grid track at the baseline viewport size.
When set to auto, the grid area will inherit this property from the parent q2-grid component.
smRowSpansm-row-spanSets the row span amount of the grid area at the SM viewport size.
smRowStartsm-row-startSets the starting row of the grid area at the SM viewport size.
When set to auto, the grid area will automatically start at the first available row.
smZIndexsm-z-indexSets the z-index of the grid area at the SM viewport size.
xlAlignxl-alignSets the vertical alignment behavior of the q2-grid-area component within its grid track at the baseline viewport size.
When set to auto, the grid area will inherit this property from the parent q2-grid component.
xlColumnSpanxl-column-spanSets the column span amount of the grid area at the XL viewport size.
xlColumnStartxl-column-startSets the starting column of the grid area at the XL viewport size.
When set to auto, the grid area will automatically start at the first available column.
xlJustifyxl-justifySets the horizontal alignment behavior of the q2-grid-area component within its grid track at the baseline viewport size.
When set to auto, the grid area will inherit this property from the parent q2-grid component.
xlRowSpanxl-row-spanSets the row span amount of the grid area at the XL viewport size.
xlRowStartxl-row-startSets the starting row of the grid area at the XL viewport size.
When set to auto, the grid area will automatically start at the first available row.
xlZIndexxl-z-indexSets the z-index of the grid area at the XL viewport size.
xsAlignxs-alignSets the vertical alignment behavior of the q2-grid-area component within its grid track at the baseline viewport size.
When set to auto, the grid area will inherit this property from the parent q2-grid component.
xsColumnSpanxs-column-spanSets the column span amount of the grid area at the XS viewport size.
xsColumnStartxs-column-startSets the starting column of the grid area at the XS viewport size.
When set to auto, the grid area will automatically start at the first available column.
xsJustifyxs-justifySets the horizontal alignment behavior of the q2-grid-area component within its grid track at the baseline viewport size.
When set to auto, the grid area will inherit this property from the parent q2-grid component.
xsRowSpanxs-row-spanSets the row span amount of the grid area at the XS viewport size.
xsRowStartxs-row-startSets the starting row of the grid area at the XS viewport size.
When set to auto, the grid area will automatically start at the first available row.
xsZIndexxs-z-indexSets the z-index of the grid area at the XS viewport size.
zIndexz-indexSets the z-index of the grid area at the baseline viewport size.
q2-grid-area uses the same breakpoint system as its parent q2-grid. The base props (column-start, column-span,
row-start, row-span, justify, align, z-index) describe the cell's placement at the smallest viewport, and each
breakpoint-prefixed prop (xs-*, sm-*, md-*, lg-*, xl-*) overrides placement at and above that breakpoint's
minimum viewport width.
| Breakpoint | Prop prefix | Applies at viewport width |
|---|---|---|
| Base | (none) | All widths (the foundation) |
| XS | xs- | ≥ 480px |
| SM | sm- | ≥ 768px |
| MD | md- | ≥ 992px |
| LG | lg- | ≥ 1200px |
| XL | xl- | ≥ 1400px |
Responsive props cascade from smaller breakpoints up to larger ones. A value set at one breakpoint applies to that breakpoint and to every larger breakpoint until a larger breakpoint overrides it. When a breakpoint prop is omitted, the grid area inherits the value from the nearest smaller breakpoint that was set, ultimately falling back to the base prop.
In the example below the highlighted area spans 1 column by default and 3 columns from MD (≥ 992px) and up.
Because sm-column-span is not set, SM inherits the base span (1); because lg-column-span and xl-column-span are not
set, LG and XL inherit the MD span (3). Resize your browser to watch the span change.
<div style="width: 100%;">
<q2-grid
columns="3"
gap="compact"
>
<q2-grid-area
column-span="1"
md-column-span="3"
><div style="height: 50px; border: 1px solid black; background-color: #02b3d8;"></div
></q2-grid-area>
<q2-grid-area><div style="height: 50px; border: 1px solid black; background-color: #c9f0f8;"></div></q2-grid-area>
<q2-grid-area><div style="height: 50px; border: 1px solid black; background-color: #c9f0f8;"></div></q2-grid-area>
</q2-grid>
</div>
<div style="width: 33.33%; height: 33.33%; aspect-ratio: 1 / 1;">
<q2-grid
columns="12"
rows="12"
gap="none"
>
<q2-grid-area
column-start="1"
column-span="1"
row-start="1"
row-span="1"
z-index="1"
><div style="width: 100%; height: 100%; border: 1px solid black; background-color: #02b3d8;"></div
></q2-grid-area>
<q2-grid-area
column-start="4"
column-span="2"
row-start="1"
row-span="1"
z-index="1"
><div style="width: 100%; height: 100%; border: 1px solid black; background-color: #02b3d8;"></div
></q2-grid-area>
<q2-grid-area
column-start="8"
column-span="2"
row-start="1"
row-span="1"
z-index="1"
><div style="width: 100%; height: 100%; border: 1px solid black; background-color: #02b3d8;"></div
></q2-grid-area>
<q2-grid-area
column-start="12"
column-span="1"
row-start="1"
row-span="1"
z-index="1"
><div style="width: 100%; height: 100%; border: 1px solid black; background-color: #02b3d8;"></div
></q2-grid-area>
<q2-grid-area
column-start="1"
column-span="1"
row-start="4"
row-span="2"
z-index="1"
><div style="width: 100%; height: 100%; border: 1px solid black; background-color: #02b3d8;"></div
></q2-grid-area>
<q2-grid-area
column-start="4"
column-span="2"
row-start="4"
row-span="2"
z-index="1"
><div style="width: 100%; height: 100%; border: 1px solid black; background-color: #02b3d8;"></div
></q2-grid-area>
<q2-grid-area
column-start="8"
column-span="2"
row-start="4"
row-span="2"
z-index="1"
><div style="width: 100%; height: 100%; border: 1px solid black; background-color: #02b3d8;"></div
></q2-grid-area>
<q2-grid-area
column-start="12"
column-span="1"
row-start="4"
row-span="2"
z-index="1"
><div style="width: 100%; height: 100%; border: 1px solid black; background-color: #02b3d8;"></div
></q2-grid-area>
<q2-grid-area
column-start="1"
column-span="1"
row-start="8"
row-span="2"
z-index="1"
><div style="width: 100%; height: 100%; border: 1px solid black; background-color: #02b3d8;"></div
></q2-grid-area>
<q2-grid-area
column-start="4"
column-span="2"
row-start="8"
row-span="2"
z-index="1"
><div style="width: 100%; height: 100%; border: 1px solid black; background-color: #02b3d8;"></div
></q2-grid-area>
<q2-grid-area
column-start="8"
column-span="2"
row-start="8"
row-span="2"
z-index="1"
><div style="width: 100%; height: 100%; border: 1px solid black; background-color: #02b3d8;"></div
></q2-grid-area>
<q2-grid-area
column-start="12"
column-span="1"
row-start="8"
row-span="2"
z-index="1"
><div style="width: 100%; height: 100%; border: 1px solid black; background-color: #02b3d8;"></div
></q2-grid-area>
<q2-grid-area
column-start="1"
column-span="1"
row-start="12"
row-span="1"
z-index="1"
><div style="width: 100%; height: 100%; border: 1px solid black; background-color: #02b3d8;"></div
></q2-grid-area>
<q2-grid-area
column-start="4"
column-span="2"
row-start="12"
row-span="1"
z-index="1"
><div style="width: 100%; height: 100%; border: 1px solid black; background-color: #02b3d8;"></div
></q2-grid-area>
<q2-grid-area
column-start="8"
column-span="2"
row-start="12"
row-span="1"
z-index="1"
><div style="width: 100%; height: 100%; border: 1px solid black; background-color: #02b3d8;"></div
></q2-grid-area>
<q2-grid-area
column-start="12"
column-span="1"
row-start="12"
row-span="1"
z-index="1"
><div style="width: 100%; height: 100%; border: 1px solid black; background-color: #02b3d8;"></div
></q2-grid-area>
<q2-grid-area
column-start="1"
column-span="4"
row-start="1"
row-span="4"
><div style="width: 100%; height: 100%; border: 1px solid black; background-color: #c9f0f8;"></div
></q2-grid-area>
<q2-grid-area
column-start="5"
column-span="4"
row-start="1"
row-span="4"
><div style="width: 100%; height: 100%; border: 1px solid black; background-color: #c9f0f8;"></div
></q2-grid-area>
<q2-grid-area
column-start="9"
column-span="4"
row-start="1"
row-span="4"
><div style="width: 100%; height: 100%; border: 1px solid black; background-color: #c9f0f8;"></div
></q2-grid-area>
<q2-grid-area
column-start="1"
column-span="4"
row-start="5"
row-span="4"
><div style="width: 100%; height: 100%; border: 1px solid black; background-color: #c9f0f8;"></div
></q2-grid-area>
<q2-grid-area
column-start="5"
column-span="4"
row-start="5"
row-span="4"
><div style="width: 100%; height: 100%; border: 1px solid black; background-color: #c9f0f8;"></div
></q2-grid-area>
<q2-grid-area
column-start="9"
column-span="4"
row-start="5"
row-span="4"
><div style="width: 100%; height: 100%; border: 1px solid black; background-color: #c9f0f8;"></div
></q2-grid-area>
<q2-grid-area
column-start="1"
column-span="4"
row-start="9"
row-span="4"
><div style="width: 100%; height: 100%; border: 1px solid black; background-color: #c9f0f8;"></div
></q2-grid-area>
<q2-grid-area
column-start="5"
column-span="4"
row-start="9"
row-span="4"
><div style="width: 100%; height: 100%; border: 1px solid black; background-color: #c9f0f8;"></div
></q2-grid-area>
<q2-grid-area
column-start="9"
column-span="4"
row-start="9"
row-span="4"
><div style="width: 100%; height: 100%; border: 1px solid black; background-color: #c9f0f8;"></div
></q2-grid-area>
</q2-grid>
</div>
Provide clean examples of how to compose multiple components together in order to achieve a specific visual outcome that is curated and maintained by Tecton.
How to build an Account Details page in Tecton: a sortable, filterable transaction list with client-side search, column sorting, and pagination.
How to build an Account Settings page in Tecton: six independent settings sections covering nickname, notifications, statement delivery, card management, spending limits, and overdraft protection.
How to build a Bank Statement page in Tecton: a computed account summary and a q2-data-table of transactions for a statement period.
How to build a Message Center page in Tecton: a two-panel layout with a message list on the left and a selected message detail plus response form on the right.
How to build a Profile page in Tecton: required-field validation for personal information, real-time cross-field password validation, and plain integration toggles.
The following CSS variables are available to override the default theme styles of the q2-grid-area component.
The changelog provides a detailed history of new features, improvements, and bug fixes going back to Tecton 1.30.0. If the button is disabled, it indicates there have been no detectable changes since then.