Skip to main content

Typography

The typography system provides consistent text styling across all components using the Heading and Text components.

Font Families

FamilyTokenUsage
Inter--font-family-sansBody text, UI elements
JetBrains Mono--font-family-monoCode, technical content

Type Scale

TokenSizeLine HeightUsage
--font-size-xs0.75rem (12px)1remCaptions, badges
--font-size-sm0.875rem (14px)1.25remSecondary text, labels
--font-size-base1rem (16px)1.5remBody text
--font-size-lg1.125rem (18px)1.75remLead text
--font-size-xl1.25rem (20px)1.75remH4 headings
--font-size-2xl1.5rem (24px)2remH3 headings
--font-size-3xl1.875rem (30px)2.25remH2 headings
--font-size-4xl2.25rem (36px)2.5remH1 headings

Font Weights

WeightValueUsage
Regular400Body text
Medium500Labels, emphasis
Semibold600Subheadings, buttons
Bold700Headings

Components

Heading

import { Heading } from '@kikumi3n/ui';

<Heading level={1}>Page Title</Heading>
<Heading level={2}>Section Title</Heading>
<Heading level={3}>Subsection</Heading>
PropTypeDefaultDescription
level1 | 2 | 3 | 4 | 5 | 62Heading level (renders <h1><h6>)

Text

import { Text } from '@kikumi3n/ui';

<Text>Default body text</Text>
<Text as="span" size="sm">Small text</Text>
<Text as="p" size="lg">Lead paragraph</Text>
PropTypeDefaultDescription
as'p' | 'span' | 'div' | 'label''p'HTML element
size'xs' | 'sm' | 'base' | 'lg''base'Font size

Best Practices

  • Use Heading for all heading text — it ensures proper heading hierarchy
  • Use Text for body content — provides consistent sizing and line height
  • Don't skip heading levels (e.g., h1h3)
  • Use semantic tokens (--font-size-*) instead of hardcoded pixel values