Command Palette

Search for a command to run...

Foundations

Spacing

இடைவெளி

Tamil DS uses a 4px base grid via Tailwind's default spacing scale. Consistent spacing creates visual rhythm and reduces cognitive load.

4px அடிப்படை கட்டகம் வழியாக Tailwind இன் இயல்புநிலை இடைவெளி அளவை பயன்படுத்துகிறோம்.

Spacing scale

The scale maps Tailwind token numbers to pixel values based on a 4px base unit. Use semantic names in code — never hard-code pixel values.

0
0px0rem
0.5
2px0.125rem
1
4px0.25rem
1.5
6px0.375rem
2
8px0.5rem
2.5
10px0.625rem
3
12px0.75rem
3.5
14px0.875rem
4
16px1rem
5
20px1.25rem
6
24px1.5rem
7
28px1.75rem
8
32px2rem
9
36px2.25rem
10
40px2.5rem
12
48px3rem
14
56px3.5rem
16
64px4rem
20
80px5rem
24
96px6rem

Semantic spacing

For component-level spacing, prefer semantic names from the table above over arbitrary values:

  • Intra-element (icon ↔ label gap): gap-2 (8px)
  • Form fields: gap-3 or gap-4 (12–16px)
  • Card padding: p-5 or p-6 (20–24px)
  • Section spacing: py-16 to py-24 (64–96px)
  • Page gutter: px-4 sm:px-6 lg:px-8

Tamil typography note

Tamil script characters are taller than Latin equivalents due to vowel markers (மாத்திரை). Always use leading-relaxed or leading-loose for Tamil paragraphs, and increase block spacing by one step when Tamil and English text appear adjacent.

Component spacing reference

Quick-reference table mapping common UI contexts to their preferred Tailwind tokens. These values are enforced across Tamil DS primitives — deviate only with a documented reason.

ContextTokenpxUsage
Icon ↔ label gapgap-28pxButtons, nav items, list items
Form field gapgap-3 / gap-412–16pxInput groups, form rows
Card paddingp-5 or p-620–24pxAll card surfaces
Card gapgap-4 or gap-616–24pxCard grids
Section paddingpy-16 sm:py-2064–80pxLanding sections
Docs content gapspace-y-624pxBetween prose blocks
Sidebar nav itempx-3 py-212–8pxNav links
Modal paddingp-624pxDialog, Sheet content

Tamil spacing rules

These rules encode typographic knowledge specific to Tamil script. Apply them whenever Tamil text is the primary language of a surface.

01

Tamil labels need 25% more vertical breathing room than Latin.

Use py-3 not py-2 for Tamil-primary buttons. Vowel markers (மாத்திரை) extend above and below the baseline.

02

Increase list item gap when Tamil text wraps.

Bump gap-3 → gap-4 when Tamil list text wraps to 2+ lines. Tight rows become unreadable at smaller viewports.

03

Card titles with Tamil text need extra icon-to-title margin.

Use mt-4 not mt-3 below the icon for diacritic clearance — the top vowel marker (ொ, ோ) clips without it.

04

Never use leading-none or leading-tight with Tamil.

Minimum leading-relaxed (1.625) for all Tamil body text. leading-tight clips ascending vowel markers and makes multi-line text illegible.

Negative space principle

Tamil DS deliberately leaves more white space around content than a comparable Latin-only design system would. Tamil script is visually denser than Latin — each character carries more visual weight, more vertical extent, and more intrinsic complexity. If the surrounding space does not compensate, pages feel cluttered and hard to scan.

This is not padding for its own sake. It is a deliberate typographic decision: generous negative space gives the script room to breathe, helps the eye separate runs of text, and reduces reading fatigue — particularly important for government and public-service interfaces where users may be less frequent readers of digitised Tamil.