Consistent spacing scale for padding, margins, and borders. Includes shadow values for depth, border-radius tokens, and z-index stacking order.
Tailwind-based spacing scale. Use for padding, margins, gaps, and sizes. Values in rem (16px base).
/* Padding (p-*, px-*, py-*) */
.p-0 /* 0px */
.p-1 /* 4px */
.p-2 /* 8px */
.p-3 /* 12px */
.p-4 /* 16px */ β Standard
.p-6 /* 24px */ β Comfortable
.p-8 /* 32px */ β Generous
.p-12 /* 48px */ β Sections
.p-16 /* 64px */
.p-20 /* 80px */
/* Margin (m-*, mx-*, my-*) */
.m-4 /* 16px margin all sides */
.mx-auto /* Horizontal centering */
.my-6 /* Top + bottom margin */
/* Gap (between flex/grid items) */
.gap-4 /* 16px gap */
.gap-6 /* 24px gap */
/* Width/Height */
.w-4 /* 16px width */
.h-8 /* 32px height */
Rounded corner values for different component types.
/* Component-specific radius */
.rounded-none /* Sharp corners (rare) */
.rounded-sm /* Minimal curve (input focus rings) */
.rounded /* Standard curve (badges) */
.rounded-md /* Medium curve (buttons) */
.rounded-lg /* Large curve (cards, alerts) */
.rounded-xl /* Extra large (modals) */
.rounded-full /* Circle (avatars, icons) */
/* Usage Pattern */
<!-- Buttons -->
<button class="rounded-lg">...</button>
<!-- Cards -->
<div class="rounded-xl">...</div>
<!-- Badges -->
<span class="rounded">...</span>
<!-- Avatar -->
<img class="rounded-full">
Shadow values for depth and elevation. Larger shadow values for components higher in stacking order.
/* Depth ordering */
.shadow-xs /* Minimal depth (hover states) */
.shadow-sm /* Light elevation (input focus) */
.shadow /* Default (cards, buttons) */
.shadow-md /* Medium (card hover) */
.shadow-lg /* High elevation (modals, dropdowns) */
.shadow-xl /* Very high (modals) */
.shadow-2xl /* Extreme (full-page modals) */
/* Variations */
.shadow-inner /* Inner shadow (inset) */
.shadow-none /* Remove shadow */
/* With hover */
.shadow-md hover:shadow-lg transition-shadow
Consistent stacking context for overlapping elements. Higher numbers appear on top.
/* Stacking Context */
.z-auto /* 0 (default) */
.z-10 /* Sticky headers, dropdowns */
.z-20 /* Fixed navbar, sidebars */
.z-30 /* Floating action buttons */
.z-40 /* Modal backdrops (semi-transparent overlay) */
.z-50 /* Modal dialog boxes */
.z-60 /* Toast notifications */
.z-70 /* Tooltips (always on top) */
/* Example: Modal Pattern */
<!-- Backdrop (z-40) -->
<div class="fixed inset-0 z-40 bg-black/50"></div>
<!-- Modal (z-50) -->
<div class="fixed z-50 bg-white rounded-lg">...</div>
<!-- Tooltip in modal (z-60) -->
<div class="absolute z-60">...</div>