Tidgrid separates two distinct layout concerns: positioning controls where cells sit within the row (viaDocumentation 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.
justify-content and align-items), while spacing controls how leftover space is distributed between cells (via justify-content and align-content). Both sets of utilities are applied on the .tg-row element and affect all child cells.
Position Utilities
Position utilities align cells along one or both axes. Thetg-pos shorthand sets both axes at once; the directional variants let you control each axis independently.
tg-pos — both axes
tg-pos sets both justify-content (horizontal) and align-items (vertical) to the same value in a single class.
| Class | justify-content | align-items |
|---|---|---|
tg-pos(start) | start | start |
tg-pos(center) | center | center |
tg-pos(end) | end | end |
tg-pos(none) | unset | unset |
html
html
tg-pos-x — horizontal axis only
tg-pos-x sets only justify-content, leaving align-items untouched.
| Class | justify-content |
|---|---|
tg-pos-x(start) | flex-start |
tg-pos-x(center) | center |
tg-pos-x(end) | flex-end |
tg-pos-x(none) | unset |
html
tg-pos-y — vertical axis only
tg-pos-y sets only align-items, leaving justify-content untouched.
| Class | align-items |
|---|---|
tg-pos-y(start) | flex-start |
tg-pos-y(center) | center |
tg-pos-y(end) | flex-end |
tg-pos-y(none) | unset |
html
Space Utilities
Space utilities distribute leftover space in the row. Wheretg-pos places cells at a position, tg-space spreads them out. These are applied on the .tg-row element and affect cell distribution along both axes.
tg-space — both axes
tg-space sets both justify-content and align-content.
| Class | justify-content | align-content |
|---|---|---|
tg-space(between) | space-between | space-between |
tg-space(around) | space-around | space-around |
tg-space(evenly) | space-evenly | space-evenly |
tg-space(none) | none | none |
- between
- around
- evenly
The first and last cells are pinned to the row edges; remaining space is divided equally between cells.
html
tg-space-x — horizontal axis only
tg-space-x sets only justify-content.
| Class | justify-content |
|---|---|
tg-space-x(between) | space-between |
tg-space-x(around) | space-around |
tg-space-x(evenly) | space-evenly |
tg-space-x(none) | unset |
tg-space-y — vertical axis only
tg-space-y sets only align-content. This is most visible in multi-line rows where cells have wrapped onto more than one line.
| Class | align-content |
|---|---|
tg-space-y(between) | space-between |
tg-space-y(around) | space-around |
tg-space-y(evenly) | space-evenly |
tg-space-y(none) | unset |
html
Practical Examples
Centred hero layout
Use
tg-pos(center) on a fixed-height row to centre a cell both horizontally and vertically — no custom CSS needed.html
Navigation bar with spaced items
Use
tg-space(between) and tg-pos-y(center) together for a classic nav layout: logo on the left, links on the right, all vertically centred.html
Right-aligned action buttons
Use
tg-pos-x(end) on a thin-mode row to push a group of buttons to the right edge.html
Combining tg-pos and tg-space
tg-pos and tg-space both write to justify-content, so applying both on the same row will let the last class in the CSS cascade win. Use the directional variants to avoid conflicts: for example, combine tg-pos-y(center) (sets align-items) with tg-space-x(between) (sets justify-content) without any collision.
html
All positioning and spacing classes are applied on
.tg-row, not on .tg-cell. They control how the Flexbox container distributes its children — individual cell sizing is handled separately by mode, frac, or span classes.Responsive Positioning
Every position and space class supports all five responsive breakpoint prefixes. Combine them to build layouts that reposition cells at different screen sizes.html
| Prefix | Min-width |
|---|---|
xs: | 36em (576px) |
sm: | 48em (768px) |
md: | 64em (1024px) |
lg: | 75em (1200px) |
xl: | 90em (1440px) |