Every Tidgrid layout is built from two primitives:Documentation Index
Fetch the complete documentation index at: https://mintlify.com/sneikki/tidgrid/llms.txt
Use this file to discover all available pages before exploring further.
.tg-row, a Flexbox container, and .tg-cell, a flex item that lives inside it. Together they give you a composable, responsive layout system that needs almost no custom CSS. Understanding how their modes interact is the key to using Tidgrid effectively.
The Base Elements
.tg-row establishes a horizontal flex container with wrapping enabled by default. .tg-cell is the direct child that holds your content. Both elements include box-sizing: border-box so padding and borders never break your layout math.
html
width: 100%), so they stack vertically. This is the safe default that works everywhere without a mode class.
You don’t need a mode class to use
.tg-row and .tg-cell. The defaults (flex-flow: row wrap on the row, full-width on cells) are intentionally predictable so you can add modes only where needed.Row Modes
A mode class on.tg-row controls how all direct .tg-cell children are sized. You only need one class on the parent to change the entire row’s layout behaviour.
- auto
- stacked
- thin
- fill
- disabled
Cells grow equally to fill all available horizontal space. Each cell gets All three cells above will be exactly one-third of the row width.
flex: 1 0 0, so they share the row width evenly regardless of content.html
Cell Modes
A mode class on an individual.tg-cell overrides the row-level mode for that cell only. This lets you have one cell behave differently from its siblings — for example, a fixed-width label next to auto-growing content fields.
html
| Class | Effect on the cell |
|---|---|
tg-mode(auto) | flex: 1 0 0; width: unset — grows to fill |
tg-mode(stacked) | flex: none; width: 100% — full width |
tg-mode(thin) | flex: 0 1 0; white-space: nowrap — content width |
tg-mode(fill) | flex: 1 0 0; width: unset — same as auto |
tg-mode(disabled) | display: none — hidden |
html
Flow Control
By default,.tg-row uses flex-wrap: wrap, so cells that overflow the row width wrap onto the next line. You can override this with a flow class.
tg-flow(keep) also sets white-space: nowrap on all child cells, ensuring text inside them doesn’t break across lines either.
Cell Ordering
Thetg-order utilities let you reorder cells visually without changing the HTML source order — useful for accessibility (logical DOM order) while adjusting visual presentation.
Move a cell to the front
Apply
tg-order(first) to push a cell before all siblings in the visual order (order: -2).html
tg-order(first) uses order: -2 and tg-order(last) uses order: 2, leaving room for intermediate values if you need to combine ordering with other Flexbox utilities in your own CSS.Responsive Variants
Every row and cell class generates responsive variants for all five breakpoints. Prefix any class with a breakpoint name followed by a colon to apply it only at that screen width and above.| Prefix | Min-width |
|---|---|
xs: | 36em (576px) |
sm: | 48em (768px) |
md: | 64em (1024px) |
lg: | 75em (1200px) |
xl: | 90em (1440px) |
html