Typography

Typography system designed for scientific content, data readability, and educational clarity in Virtual Labs.

Stable

Typography Principles

Scientific Clarity

Typography prioritizes readability of scientific data, formulas, and technical content.

Educational Hierarchy

Clear information hierarchy supports learning objectives and content comprehension.

Accessibility First

Font choices and sizing ensure readability for users with diverse visual needs.

Font Families

Primary Font - Inter
Used for all interface text, headings, and body content
Inter Font Family
The quick brown fox jumps over the lazy dog. 1234567890
Optimized for digital interfaces with excellent readability at all sizes.
font-family: Inter, system-ui, sans-serif;
Monospace Font - JetBrains Mono
Used for code, data values, and scientific notation
JetBrains Mono
pH: 7.42 | Temp: 25.3°C | 0123456789
Designed for code and data with enhanced readability of numbers and symbols.
font-family: 'JetBrains Mono', 'Fira Code', monospace;

Type Scale

Font Sizes
Harmonious scale for all text elements
The quick brown fox jumps over the lazy dog
12px / 16px - Captions, small labels
text-xs
The quick brown fox jumps over the lazy dog
14px / 20px - Body text, form labels
text-sm
The quick brown fox jumps over the lazy dog
16px / 24px - Default body text
text-base
The quick brown fox jumps over the lazy dog
18px / 28px - Large body text
text-lg
The quick brown fox jumps over the lazy dog
20px / 28px - Small headings
text-xl
The quick brown fox jumps over the lazy dog
24px / 32px - Section headings
text-2xl
The quick brown fox jumps over the lazy dog
30px / 36px - Page headings
text-3xl
The quick brown fox jumps over the lazy dog
36px / 40px - Display headings
text-4xl
The quick brown fox jumps over the lazy dog
48px / 1 - Hero headings
text-5xl

Font Weights

Weight Variations
Different weights for emphasis and hierarchy
Virtual Labs Typography System
300 - Light emphasis
text-lg font-light
Virtual Labs Typography System
400 - Body text
text-lg font-normal
Virtual Labs Typography System
500 - Emphasis, labels
text-lg font-medium
Virtual Labs Typography System
600 - Headings, important text
text-lg font-semibold
Virtual Labs Typography System
700 - Strong emphasis
text-lg font-bold

Scientific Typography

Mathematical Notation
E = mc2
H2O + NaCl → Solution
ΔG = ΔH - TΔS
<sup>2</sup> for superscript <sub>2</sub> for subscript
Data Presentation
25.4°C ± 0.1
1.23 × 10⁻⁶ mol/L
pH: 7.42
λ = 589.3 nm
Use monospace for precise measurements

Usage Guidelines

Lab Interface Typography

Control Labels

Use medium weight, small to base size

Temperature Control

Data Values

Always use monospace for measurements

25.4°C

Status Messages

Clear, scannable text for system feedback

✓ Experiment running
Educational Content

Instructions

Clear, step-by-step guidance

1. Adjust the temperature to 25°C

Explanations

Readable body text for concepts

The pH scale measures the acidity or alkalinity of a solution.

Formulas

Mathematical expressions

pH = -log[H+]

Implementation

CSS Classes
Tailwind typography utilities
/* Font Sizes */
text-xs     /* 12px */
text-sm     /* 14px */
text-base   /* 16px */
text-lg     /* 18px */
text-xl     /* 20px */
text-2xl    /* 24px */
text-3xl    /* 30px */
text-4xl    /* 36px */

/* Font Weights */
font-light    /* 300 */
font-normal   /* 400 */
font-medium   /* 500 */
font-semibold /* 600 */
font-bold     /* 700 */

/* Font Families */
font-sans     /* Inter */
font-mono     /* JetBrains Mono */

/* Line Heights */
leading-tight   /* 1.25 */
leading-normal  /* 1.5 */
leading-relaxed /* 1.625 */
CSS Custom Properties
Typography tokens for consistent styling
:root {
  /* Font Families */
  --vl-font-sans: Inter, system-ui, sans-serif;
  --vl-font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  
  /* Font Sizes */
  --vl-text-xs: 0.75rem;    /* 12px */
  --vl-text-sm: 0.875rem;   /* 14px */
  --vl-text-base: 1rem;     /* 16px */
  --vl-text-lg: 1.125rem;   /* 18px */
  --vl-text-xl: 1.25rem;    /* 20px */
  --vl-text-2xl: 1.5rem;    /* 24px */
  --vl-text-3xl: 1.875rem;  /* 30px */
  --vl-text-4xl: 2.25rem;   /* 36px */
  
  /* Line Heights */
  --vl-leading-tight: 1.25;
  --vl-leading-normal: 1.5;
  --vl-leading-relaxed: 1.625;
  
  /* Component-specific typography */
  --vl-heading-font: var(--vl-font-sans);
  --vl-body-font: var(--vl-font-sans);
  --vl-data-font: var(--vl-font-mono);
  --vl-code-font: var(--vl-font-mono);
}
Accessibility Considerations

Minimum Font Sizes

Never use text smaller than 12px (text-xs) for body content. Use 14px (text-sm) minimum for important information.

Color Contrast

Ensure sufficient contrast ratios: 4.5:1 for normal text, 3:1 for large text (18px+ or 14px+ bold).

Line Length

Optimal line length is 45-75 characters for body text. Use max-width utilities to control line length.

Responsive Typography

Use responsive text sizes (sm:text-lg, md:text-xl) to ensure readability across devices.