Skip to main content

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.

Position classes control how cells are distributed and aligned within a .tg-row flex container. Tidgrid splits this into two groups: pos classes that set justify-content and align-items for edge-aligned or centered layouts, and space classes that set justify-content and align-content for evenly distributed spacing. Both groups offer axis-specific variants and full responsive support.

tg-pos — Alignment Variants

The tg-pos(*) shorthand sets both justify-content (main axis) and align-items (cross axis) simultaneously.
Classjustify-contentalign-items
.tg-pos(start)startstart
.tg-pos(center)centercenter
.tg-pos(end)endend
.tg-pos(none)unsetunset
<!-- Horizontally and vertically center all cells -->
<div class="tg-row tg-mode(thin) tg-pos(center)">
  <div class="tg-cell">Centered</div>
  <div class="tg-cell">Centered</div>
</div>

tg-pos-x — Horizontal Alignment

Use tg-pos-x(*) to control only the main (horizontal) axis via justify-content.
Classjustify-content
.tg-pos-x(start)flex-start
.tg-pos-x(center)center
.tg-pos-x(end)flex-end
.tg-pos-x(none)unset
<!-- Push cells to the right on large screens -->
<div class="tg-row tg-mode(thin) lg:tg-pos-x(end)">
  <div class="tg-cell">Right-aligned at lg</div>
  <div class="tg-cell">Right-aligned at lg</div>
</div>

tg-pos-y — Vertical Alignment

Use tg-pos-y(*) to control only the cross (vertical) axis via align-items.
Classalign-items
.tg-pos-y(start)flex-start
.tg-pos-y(center)center
.tg-pos-y(end)flex-end
.tg-pos-y(none)unset
<!-- Vertically center cells of differing heights -->
<div class="tg-row tg-mode(auto) tg-pos-y(center)">
  <div class="tg-cell">Tall content…</div>
  <div class="tg-cell">Short</div>
</div>

tg-space — Distribution Variants

The tg-space(*) shorthand applies a space-* distribution to both justify-content (main axis) and align-content (line stacking for multi-line rows).
Classjustify-contentalign-content
.tg-space(between)space-betweenspace-between
.tg-space(around)space-aroundspace-around
.tg-space(evenly)space-evenlyspace-evenly
.tg-space(none)nonenone
<!-- Distribute cells evenly across the full row width -->
<div class="tg-row tg-space(between)">
  <div class="tg-cell tg-mode(thin)">Nav item</div>
  <div class="tg-cell tg-mode(thin)">Nav item</div>
  <div class="tg-cell tg-mode(thin)">Nav item</div>
</div>

tg-space-x — Horizontal Distribution

Use tg-space-x(*) to apply a spacing distribution to the main axis only via justify-content.
Classjustify-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 Distribution

Use tg-space-y(*) to apply a spacing distribution to line stacking only via align-content.
Classalign-content
.tg-space-y(between)space-between
.tg-space-y(around)space-around
.tg-space-y(evenly)space-evenly
.tg-space-y(none)unset

Practical Examples

Center a small cluster of cells both horizontally and vertically inside a fixed-height row.
<div class="tg-row tg-mode(thin) tg-pos(center) tg-gap(md)">
  <div class="tg-cell">Icon</div>
  <div class="tg-cell">Headline</div>
  <div class="tg-cell">CTA button</div>
</div>

Responsive Usage

All tg-pos, tg-pos-x, tg-pos-y, tg-space, tg-space-x, and tg-space-y classes support breakpoint prefixes.
BreakpointPrefixMin-Width
Extra smallxs:36em (576px)
Smallsm:48em (768px)
Mediummd:64em (1024px)
Largelg:75em (1200px)
Extra largexl:90em (1440px)
<!-- Stack and center on mobile; spread between on large screens -->
<div class="tg-row tg-mode(stacked) tg-pos(center) lg:tg-mode(thin) lg:tg-space(between)">
  <div class="tg-cell">Link</div>
  <div class="tg-cell">Link</div>
  <div class="tg-cell">Link</div>
</div>
tg-pos and tg-space can conflict if both set justify-content. When composing them, prefer the axis-specific variants (tg-pos-x / tg-space-x) to avoid unintended overrides.

Build docs developers (and LLMs) love