Typography
Overview of the typography system and text tokens in Apsara.
Typography tokens cover font families, sizes, weights, and spacing. They follow the active style variant: modern uses Inter, traditional uses Lora and Josefin Sans. Text built on the tokens stays consistent and changes with the style.
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
Type tokens carry size, weight, and line height together. Set them as a group so a change to the scale reaches every surface at once.
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