Back to Tutorials
Design System • 45 minutes

AEROSNAP Design System

Master the components, patterns, and principles that power beautiful, consistent interfaces

Design-Focused
Code Examples

Design Principles

Consistency

Unified visual language across all components

Spacing system (4px, 8px, 16px, 24px, 32px)
Typography scales
Color schemes

Accessibility

WCAG 2.1 AA compliant design patterns

Color contrast ratios
Focus indicators
Screen reader support

Responsiveness

Mobile-first approach with fluid layouts

Breakpoint system
Flexible grid
Touch-friendly interactions

Performance

Optimized components for fast loading

Tree-shakable imports
Minimal CSS
Lazy loading

Color System

Primary

Main actions, links

#3B82F6
#1E40AF
#1D4ED8

Secondary

Text, borders

#64748B
#475569
#334155

Success

Success states

#10B981
#059669
#047857

Warning

Warnings, alerts

#F59E0B
#D97706
#B45309

Error

Errors, destructive

#EF4444
#DC2626
#B91C1C

Neutral

Backgrounds, dividers

#F8FAFC
#E2E8F0
#94A3B8

Component Library

Layout Components

Structural elements for page organization

Container

Content width management

Grid

Responsive layout system

Stack

Vertical/horizontal spacing

Flex

Flexible layouts

Interactive Components

User interaction elements

Button

Primary actions

Input

Text input fields

Select

Dropdown selections

Checkbox

Boolean choices

Feedback Components

Status and information display

Alert

Important messages

Toast

Temporary notifications

Progress

Loading states

Badge

Status indicators

Navigation Components

Site navigation and wayfinding

Navbar

Main site navigation

Breadcrumb

Page hierarchy

Pagination

Content navigation

Tabs

Content organization

Typography

Heading 1 - 36px

text-4xl font-bold

Heading 2 - 30px

text-3xl font-bold

Heading 3 - 24px

text-2xl font-semibold

Heading 4 - 20px

text-xl font-semibold

Large body text - 18px

text-lg

Regular body text - 16px

text-base

Small text - 14px

text-sm text-gray-500

Usage Examples

Button Component

// Button component usage
<Button variant="primary">Primary Button</Button>
<Button variant="secondary">Secondary Button</Button>
<Button variant="text">Text Button</Button>

Design Resources

Download these resources to get started with the AEROSNAP design system:

Next Steps

Now that you understand the design system, explore these advanced topics:

Step-by-Step Implementation

Tutorial Sections

1

Design Tokens Foundation

Establish the foundation with design tokens for consistent styling

1

Color System Implementation

8 min

Design Tokens are the visual design atoms of your design system. They store design decisions in a platform-agnostic way.

Color Token Structure:
- Primary Colors: Brand identity and main actions
- Semantic Colors: Success, warning, error states
- Neutral Colors: Text, backgrounds, borders
- Dark Mode Variants: Automatic theme switching

Best Practice: Use HSL values for better manipulation and accessibility.
Implementation
// design-tokens/colors.ts
export const colors = {
  // Primary Brand Colors
  primary: {
    50: 'hsl(214, 100%, 97%)',
    100: 'hsl(214, 95%, 93%)',
    200: 'hsl(213, 97%, 87%)',
    300: 'hsl(212, 96%, 78%)',
    400: 'hsl(213, 94%, 68%)',
    500: 'hsl(217, 91%, 60%)', // Main brand color
    600: 'hsl(221, 83%, 53%)',
    700: 'hsl(224, 76%, 48%)',
    800: 'hsl(226, 71%, 40%)',
    900: 'hsl(224, 64%, 33%)',
    950: 'hsl(226, 55%, 21%)',
  },

  // Semantic Colors
  semantic: {
    success: {
      50: 'hsl(151, 81%, 96%)',
      500: 'hsl(151, 55%, 53%)',
      600: 'hsl(151, 55%, 43%)',
      700: 'hsl(151, 55%, 33%)',
    },
    warning: {
      50: 'hsl(48, 100%, 96%)',
      500: 'hsl(38, 92%, 50%)',
      600: 'hsl(32, 95%, 44%)',
      700: 'hsl(26, 90%, 37%)',
    },
    error: {
      50: 'hsl(0, 86%, 97%)',
      500: 'hsl(0, 84%, 60%)',
      600: 'hsl(0, 72%, 51%)',
      700: 'hsl(0, 74%, 42%)',
    },
  },

  // Neutral Grays
  neutral: {
    50: 'hsl(210, 40%, 98%)',
    100: 'hsl(210, 40%, 96%)',
    200: 'hsl(214, 32%, 91%)',
    300: 'hsl(213, 27%, 84%)',
    400: 'hsl(215, 20%, 65%)',
    500: 'hsl(215, 16%, 47%)',
    600: 'hsl(215, 19%, 35%)',
    700: 'hsl(215, 25%, 27%)',
    800: 'hsl(217, 33%, 17%)',
    900: 'hsl(222, 84%, 5%)',
  },
} as const;

// Tailwind CSS configuration
// tailwind.config.ts
export default {
  theme: {
    colors: {
      primary: colors.primary,
      success: colors.semantic.success,
      warning: colors.semantic.warning,
      error: colors.semantic.error,
      gray: colors.neutral,
      // Dark mode automatically handled by Tailwind
    },
  },
};
2

Typography Scale System

7 min

Typography Scale creates visual hierarchy and consistent text sizing across your application.

Key Principles:
- Modular Scale: Mathematical relationship between font sizes
- Line Height: 1.5x font size for optimal readability
- Font Weights: Strategic use of weight for hierarchy
- Responsive Typography: Fluid scaling across devices

Implementation: Use clamp() for responsive font sizes.
Implementation
// design-tokens/typography.ts
export const typography = {
  fontFamily: {
    sans: ['Inter', 'system-ui', 'sans-serif'],
    mono: ['JetBrains Mono', 'monospace'],
  },

  fontSize: {
    xs: ['0.75rem', { lineHeight: '1rem' }],     // 12px
    sm: ['0.875rem', { lineHeight: '1.25rem' }], // 14px
    base: ['1rem', { lineHeight: '1.5rem' }],    // 16px
    lg: ['1.125rem', { lineHeight: '1.75rem' }], // 18px
    xl: ['1.25rem', { lineHeight: '1.75rem' }],  // 20px
    '2xl': ['1.5rem', { lineHeight: '2rem' }],   // 24px
    '3xl': ['1.875rem', { lineHeight: '2.25rem' }], // 30px
    '4xl': ['2.25rem', { lineHeight: '2.5rem' }],   // 36px
    '5xl': ['3rem', { lineHeight: '1' }],           // 48px
    '6xl': ['3.75rem', { lineHeight: '1' }],        // 60px
  },

  fontWeight: {
    normal: '400',
    medium: '500',
    semibold: '600',
    bold: '700',
  },

  // Responsive typography using clamp()
  fluidTypography: {
    h1: 'clamp(2.25rem, 4vw, 3.75rem)', // 36px - 60px
    h2: 'clamp(1.875rem, 3vw, 3rem)',   // 30px - 48px
    h3: 'clamp(1.5rem, 2.5vw, 2.25rem)', // 24px - 36px
    h4: 'clamp(1.25rem, 2vw, 1.5rem)',   // 20px - 24px
    body: 'clamp(1rem, 1.5vw, 1.125rem)', // 16px - 18px
  },
} as const;

// CSS Custom Properties for fluid typography
// styles/globals.css
:root {
  --font-h1: clamp(2.25rem, 4vw, 3.75rem);
  --font-h2: clamp(1.875rem, 3vw, 3rem);
  --font-h3: clamp(1.5rem, 2.5vw, 2.25rem);
  --font-h4: clamp(1.25rem, 2vw, 1.5rem);
  --font-body: clamp(1rem, 1.5vw, 1.125rem);
}

.text-fluid-h1 { font-size: var(--font-h1); }
.text-fluid-h2 { font-size: var(--font-h2); }
.text-fluid-h3 { font-size: var(--font-h3); }
.text-fluid-h4 { font-size: var(--font-h4); }
.text-fluid-body { font-size: var(--font-body); }
3

Spacing and Layout Tokens

5 min

Spacing System ensures consistent spacing throughout your application using a mathematical scale.

Spacing Scale: Based on 4px units for pixel-perfect layouts
- 0.25 = 1px: Borders, fine details
- 0.5 = 2px: Very tight spacing
- 1 = 4px: Base unit
- 2 = 8px: Small spacing
- 4 = 16px: Medium spacing
- 8 = 32px: Large spacing

Layout Tokens: Breakpoints, container sizes, and grid systems.
Implementation
// design-tokens/spacing.ts
export const spacing = {
  0: '0',
  px: '1px',
  0.5: '0.125rem',  // 2px
  1: '0.25rem',     // 4px
  1.5: '0.375rem',  // 6px
  2: '0.5rem',      // 8px
  2.5: '0.625rem',  // 10px
  3: '0.75rem',     // 12px
  3.5: '0.875rem',  // 14px
  4: '1rem',        // 16px
  5: '1.25rem',     // 20px
  6: '1.5rem',      // 24px
  7: '1.75rem',    // 28px
  8: '2rem',        // 32px
  9: '2.25rem',     // 36px
  10: '2.5rem',     // 40px
  11: '2.75rem',    // 44px
  12: '3rem',       // 48px
  14: '3.5rem',     // 56px
  16: '4rem',       // 64px
  20: '5rem',       // 80px
  24: '6rem',       // 96px
  28: '7rem',       // 112px
  32: '8rem',       // 128px
} as const;

// Layout tokens
export const layout = {
  // Breakpoints
  breakpoints: {
    sm: '640px',   // Small tablets
    md: '768px',   // Large tablets
    lg: '1024px',  // Laptops
    xl: '1280px',  // Desktops
    '2xl': '1536px', // Large screens
  },

  // Container sizes
  container: {
    sm: '640px',
    md: '768px',
    lg: '1024px',
    xl: '1280px',
    '2xl': '1400px',
  },

  // Z-index scale
  zIndex: {
    dropdown: 1000,
    sticky: 1020,
    fixed: 1030,
    modal: 1040,
    popover: 1050,
    tooltip: 1060,
    toast: 1070,
  },

  // Border radius scale
  borderRadius: {
    none: '0',
    sm: '0.125rem',   // 2px
    DEFAULT: '0.25rem', // 4px
    md: '0.375rem',   // 6px
    lg: '0.5rem',     // 8px
    xl: '0.75rem',    // 12px
    '2xl': '1rem',    // 16px
    '3xl': '1.5rem',  // 24px
    full: '9999px',
  },
} as const;
Section 1 of 3

Build Your Design System

Start creating consistent, scalable interfaces today