Design System

A comprehensive style guide for consistent web design

Color Palette

Our color palette is designed to create a cohesive visual identity. Use Primary Purple for main actions and branding elements, Deep Violet for secondary emphasis, Success Green for positive feedback, and Alert Red for errors or warnings. Light Gray provides subtle backgrounds, while Dark Slate ensures readable text content.

Primary Purple
--color-primary: #667eea

Main brand color used for primary buttons, links, and key interactive elements.

Deep Violet
--color-secondary: #764ba2

Secondary brand color for accents, hover states, and visual hierarchy.

Success Green
--color-success: #48bb78

Used for success messages, confirmations, and positive actions.

Alert Red
--color-danger: #f56565

Error states, warnings, and destructive actions.

Light Gray
--color-background: #edf2f7

Background color for sections, cards, and subtle divisions.

Dark Slate
--color-text-primary: #1a202c

Primary text color and dark UI elements.

Typography

Our typography system uses three carefully selected typefaces. Inter serves as our primary sans-serif for body text and UI elements, ensuring excellent readability. Playfair Display adds elegance to headings and titles. Fira Code is reserved for code snippets and technical content. Always maintain proper hierarchy by using appropriate font weights and sizes.

Inter

Primary font for body text, UI elements, and general content.

Regular (400)
The quick brown fox jumps over the lazy dog
Medium (500)
The quick brown fox jumps over the lazy dog
Semi-Bold (600)
The quick brown fox jumps over the lazy dog
Bold (700)
The quick brown fox jumps over the lazy dog
Italic
The quick brown fox jumps over the lazy dog
Playfair Display

Use for main headings, hero titles, and decorative text.

Regular (400)
The quick brown fox jumps over the lazy dog
Bold (700)
The quick brown fox jumps over the lazy dog
Fira Code

Reserved for code blocks, technical documentation, and inline code.

Regular (400)
const message = "Hello World";
Medium (500)
function calculate(x, y) { return x + y; }

Text Styles

These predefined text styles ensure consistency across all pages. Use H1 for page titles, H2 for major sections, and H3 for subsections. Body text should use the paragraph style, while links maintain the defined color and hover states. Code elements use monospace font with a distinct background for clarity.

Main Heading (H1)

Use once per page for the main page title or hero heading.

font-family: 'Playfair Display', serif; font-size: 3.5rem; font-weight: 700; color: var(--color-text-primary); line-height: 1.2;
This is a Main Heading
Section Heading (H2)

Use for major content sections and primary divisions on the page.

font-family: 'Playfair Display', serif; font-size: 2.5rem; font-weight: 700; color: var(--color-text-primary); line-height: 1.3; border-bottom: 3px solid var(--color-primary);
This is a Section Heading
Subsection Heading (H3)

Use for subsections within major content areas.

font-family: 'Inter', sans-serif; font-size: 1.5rem; font-weight: 600; color: var(--color-text-secondary); line-height: 1.4;
This is a Subsection Heading
Body Text (Paragraph)

Default style for all body content and general text.

font-family: 'Inter', sans-serif; font-size: 1rem; font-weight: 400; color: var(--color-text-body); line-height: 1.6;
This is body text. It's designed to be highly readable and comfortable for extended reading. The line height and color are optimized for maximum legibility across different screen sizes and devices.
Link Text

Use for all clickable text links throughout the site.

font-family: 'Inter', sans-serif; font-weight: 500; color: var(--color-primary); text-decoration: underline; transition: color 0.3s ease;
Code Text

Use for inline code snippets within body text.

font-family: 'Fira Code', monospace; font-size: 0.9rem; background-color: var(--color-code-bg); padding: 2px 6px; border-radius: 4px; color: var(--color-danger);
Use console.log() to debug your application.

Buttons

Buttons are key interactive elements. Use Primary buttons for main actions, Secondary buttons for alternative actions, Success buttons for confirmations, and Danger buttons for destructive actions. Ensure proper spacing around buttons and avoid using too many primary buttons on a single page.

Primary Button

Main call-to-action buttons (e.g., "Sign Up", "Get Started")

background-color: var(--color-primary); color: white; padding: 12px 24px; border-radius: 8px; font-weight: 600;
Secondary Button

Secondary actions or alternative options

background-color: transparent; color: var(--color-primary); border: 2px solid var(--color-primary); padding: 12px 24px; border-radius: 8px; font-weight: 600;
Success Button

Positive actions like form submissions or confirmations

background-color: var(--color-success); color: white; padding: 12px 24px; border-radius: 8px; font-weight: 600;
Danger Button

Destructive actions like deletions or cancellations

background-color: var(--color-danger); color: white; padding: 12px 24px; border-radius: 8px; font-weight: 600;

Spacing & Layout

Consistent spacing creates visual rhythm and improves readability. Use the spacing scale below for margins, padding, and gaps throughout your designs. Smaller values (xs, sm) work well for tight groupings, while larger values (lg, xl) create clear separation between major sections.

Extra Small
--spacing-xs: 4px

Tight spacing between related elements

Small
--spacing-sm: 8px

Small gaps, icon spacing

Medium
--spacing-md: 16px

Default spacing for most elements

Large
--spacing-lg: 24px

Section padding, card spacing

Extra Large
--spacing-xl: 32px

Major section separation

2X Large
--spacing-xxl: 48px

Hero sections, large containers