Hireable LogoHireable
Frontend

Design System

Styling conventions, Tailwind CSS configuration, and design tokens

Overview

The design system is built on Tailwind CSS 4.1.17 with custom configuration for consistent styling across the application.

Color Palette

The application uses CSS custom properties for theming:

:root {
  --background: 0 0% 100%;
  --foreground: 222.2 84% 4.9%;
  --card: 0 0% 100%;
  --card-foreground: 222.2 84% 4.9%;
  --popover: 0 0% 100%;
  --popover-foreground: 222.2 84% 4.9%;
  --primary: 222.2 47.4% 11.2%;
  --primary-foreground: 210 40% 98%;
  --secondary: 210 40% 96.1%;
  --secondary-foreground: 222.2 47.4% 11.2%;
  --muted: 210 40% 96.1%;
  --muted-foreground: 215.4 16.3% 46.9%;
  --accent: 210 40% 96.1%;
  --accent-foreground: 222.2 47.4% 11.2%;
  --destructive: 0 84.2% 60.2%;
  --destructive-foreground: 210 40% 98%;
  --border: 214.3 31.8% 91.4%;
  --input: 214.3 31.8% 91.4%;
  --ring: 222.2 84% 4.9%;
  --radius: 0.5rem;
}

Typography

Font Stack

The application uses system fonts for optimal performance:

font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, 
             "Helvetica Neue", Arial, sans-serif;

Text Sizes

Use Tailwind's typography scale:

<h1 className="text-4xl font-bold">Heading 1</h1>
<h2 className="text-3xl font-semibold">Heading 2</h2>
<h3 className="text-2xl font-semibold">Heading 3</h3>
<p className="text-base">Body text</p>
<span className="text-sm text-muted-foreground">Small text</span>
<span className="text-xs">Extra small</span>

Spacing

Use Tailwind's spacing scale consistently:

ClassValueUsage
p-1 / m-10.25rem (4px)Tight spacing
p-2 / m-20.5rem (8px)Small spacing
p-4 / m-41rem (16px)Default spacing
p-6 / m-61.5rem (24px)Medium spacing
p-8 / m-82rem (32px)Large spacing
<div className="p-4 space-y-4">
  <Card className="p-6">
    <CardContent className="space-y-2">
      {/* Content */}
    </CardContent>
  </Card>
</div>

Border Radius

Use the --radius variable for consistent rounding:

<div className="rounded-md">Default radius</div>
<div className="rounded-lg">Large radius</div>
<div className="rounded-full">Circular</div>

Shadows

<div className="shadow-sm">Subtle shadow</div>
<div className="shadow">Default shadow</div>
<div className="shadow-md">Medium shadow</div>
<div className="shadow-lg">Large shadow</div>

Component Variants

Use class-variance-authority for component variants:

import { cva, type VariantProps } from "class-variance-authority";
 
const buttonVariants = cva(
  // Base styles
  "inline-flex items-center justify-center rounded-md font-medium transition-colors",
  {
    variants: {
      variant: {
        default: "bg-primary text-primary-foreground hover:bg-primary/90",
        secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
        destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
        outline: "border border-input bg-background hover:bg-accent",
        ghost: "hover:bg-accent hover:text-accent-foreground",
        link: "text-primary underline-offset-4 hover:underline",
      },
      size: {
        default: "h-9 px-4 py-2",
        sm: "h-8 px-3 text-xs",
        lg: "h-10 px-8",
        icon: "h-9 w-9",
      },
    },
    defaultVariants: {
      variant: "default",
      size: "default",
    },
  }
);

Responsive Design

Use Tailwind's responsive prefixes:

<div className="
  grid 
  grid-cols-1 
  md:grid-cols-2 
  lg:grid-cols-3 
  gap-4
">
  {/* Responsive grid */}
</div>
 
<nav className="
  hidden 
  md:flex 
  items-center 
  space-x-4
">
  {/* Hidden on mobile, flex on tablet+ */}
</nav>

Breakpoints

PrefixMin WidthDescription
sm:640pxSmall devices
md:768pxTablets
lg:1024pxLaptops
xl:1280pxDesktops
2xl:1536pxLarge screens

Animation

Framer Motion

Use Framer Motion for complex animations:

import { motion } from "framer-motion";
 
<motion.div
  initial={{ opacity: 0, y: 20 }}
  animate={{ opacity: 1, y: 0 }}
  exit={{ opacity: 0, y: -20 }}
  transition={{ duration: 0.3 }}
>
  Animated content
</motion.div>

Tailwind Animations

<div className="animate-spin">Spinner</div>
<div className="animate-pulse">Loading skeleton</div>
<div className="animate-bounce">Bouncing element</div>

Transitions

<button className="
  transition-colors 
  duration-200 
  hover:bg-primary/90
">
  Hover me
</button>
 
<div className="
  transition-all 
  duration-300 
  ease-in-out
  hover:scale-105
">
  Scale on hover
</div>

Glassmorphism

The GlassCard component implements glassmorphism:

<GlassCard className="p-6">
  <h2>Glass Effect</h2>
  <p>Content with blur background</p>
</GlassCard>

CSS implementation:

.glass-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
}

Accessibility

Focus States

All interactive elements have visible focus states:

<button className="
  focus-visible:outline-none 
  focus-visible:ring-2 
  focus-visible:ring-ring 
  focus-visible:ring-offset-2
">
  Accessible button
</button>

Color Contrast

Ensure WCAG AA compliance (4.5:1 for normal text, 3:1 for large text):

// ✅ Good contrast
<p className="text-foreground">High contrast text</p>
 
// ⚠️ Check contrast
<p className="text-muted-foreground">Muted text - verify contrast</p>

Screen Reader Support

<button aria-label="Close dialog">
  <XIcon className="h-4 w-4" aria-hidden="true" />
</button>
 
<span className="sr-only">Loading...</span>

Utility Function

The cn utility merges Tailwind classes intelligently:

import { cn } from "@/lib/utils";
 
// Merge classes with conflict resolution
cn("px-4 py-2", "px-6") // → "py-2 px-6"
 
// Conditional classes
cn("base-class", isActive && "active-class")
 
// With className prop
cn(buttonVariants({ variant, size }), className)

On this page