Typography
Overview of the typography system and text tokens in Apsara.Apsara provides a comprehensive typography system with carefully crafted font families, sizes, weights, and spacing. Typography tokens adapt based on the active style variant—modern style uses Inter for a clean, technical aesthetic while traditional style uses Lora and Josefin Sans for a warmer, editorial feel. Using these tokens ensures your text styling remains consistent and automatically adapts to style changes.
Font Families
Apsara includes three font family categories for different use cases.
--rs-font-titleInter, sans-serif--rs-font-bodyInter, sans-serif--rs-font-monoMenlo, JetBrains Mono, monospaceAvailable Fonts
--rs-font-interInter--rs-font-loraLora--rs-font-josefin-sansJosefin Sans--rs-font-jetbrains-monoJetBrains Mono--rs-font-menloMenloFont Weights
--rs-font-weight-regular400--rs-font-weight-medium500Body Text
Font sizes, line heights, and letter spacing for body content.
--rs-font-size-micro10px--rs-line-height-micro12px--rs-letter-spacing-micro0.5px--rs-font-size-mini11px--rs-line-height-mini16px--rs-letter-spacing-mini0.5px--rs-font-size-small12px--rs-line-height-small16px--rs-letter-spacing-small0.4px--rs-font-size-regular14px--rs-line-height-regular20px--rs-letter-spacing-regular0.25px--rs-font-size-large16px--rs-line-height-large24px--rs-letter-spacing-large0.5pxTitle Text
Font sizes, line heights, and letter spacing for headings and titles.
--rs-font-size-t120px--rs-line-height-t124px--rs-letter-spacing-t10--rs-font-size-t224px--rs-line-height-t232px--rs-letter-spacing-t20--rs-font-size-t328px--rs-line-height-t336px--rs-letter-spacing-t30--rs-font-size-t432px--rs-line-height-t440px--rs-letter-spacing-t40Monospace Text
Font sizes, line heights, and letter spacing for code and technical content.
--rs-font-size-mono-mini11px--rs-line-height-mono-mini16px--rs-letter-spacing-mono-mini0px--rs-font-size-mono-small12px--rs-line-height-mono-small16px--rs-letter-spacing-mono-small0px--rs-font-size-mono-regular14px--rs-line-height-mono-regular20px--rs-letter-spacing-mono-regular0px--rs-font-size-mono-large16px--rs-line-height-mono-large24px--rs-letter-spacing-mono-large0pxStyle Variants
Apsara supports different style variants that change typography to match your design preference.
Traditional Style
When using data-style="traditional", the font families change to:
--rs-font-titleLora, serif--rs-font-bodyJosefin Sans, sans-serifUsage
1/* Dashboard metric display */2.metric-label {3 font-family: var(--rs-font-body);4 font-size: var(--rs-font-size-small);5 font-weight: var(--rs-font-weight-regular);6 line-height: var(--rs-line-height-small);7 letter-spacing: var(--rs-letter-spacing-small);8 text-transform: uppercase;9}1011.metric-value {12 font-family: var(--rs-font-title);13 font-size: var(--rs-font-size-t3);14 font-weight: var(--rs-font-weight-medium);15 line-height: var(--rs-line-height-t3);16}1718/* Article or blog post layout */19.article-title {20 font-family: var(--rs-font-title);21 font-size: var(--rs-font-size-t4);22 line-height: var(--rs-line-height-t4);23 font-weight: var(--rs-font-weight-medium);24}2526.article-meta {27 font-size: var(--rs-font-size-mini);28 line-height: var(--rs-line-height-mini);29 letter-spacing: var(--rs-letter-spacing-mini);30}3132.article-body {33 font-family: var(--rs-font-body);34 font-size: var(--rs-font-size-regular);35 line-height: var(--rs-line-height-regular);36}3738/* Terminal or log output */39.log-output {40 font-family: var(--rs-font-mono);41 font-size: var(--rs-font-size-mono-small);42 line-height: var(--rs-line-height-mono-small);43}4445.log-timestamp {46 font-family: var(--rs-font-mono);47 font-size: var(--rs-font-size-mono-mini);48 line-height: var(--rs-line-height-mono-mini);49}5051/* Data table headers and cells */52.table-header {53 font-size: var(--rs-font-size-small);54 font-weight: var(--rs-font-weight-medium);55 line-height: var(--rs-line-height-small);56 letter-spacing: var(--rs-letter-spacing-small);57}5859.table-cell {60 font-size: var(--rs-font-size-regular);61 line-height: var(--rs-line-height-regular);62}
Best Practices
- Use semantic sizing - Match font sizes to their intended purpose (body, titles, code)
- Pair sizes with line heights - Always use the corresponding line height token for each font size
- Maintain hierarchy - Use font weights and sizes to establish clear visual hierarchy
- Consider readability - Use appropriate letter spacing for different text sizes