Skip to content

Typography

The design system uses a structured type scale with dedicated components for each text role.

Font Family

scss
$font-family-primary:
  'Jost',
  -apple-system,
  BlinkMacSystemFont,
  'Segoe UI',
  sans-serif;

Type Components

Each typography role has a dedicated Vue component with predefined sizes:

ComponentSizesUse Case
Display2xs–3xlHero text, major headings
Heading3xs–4xlSection headings
Bodyxs–2xlParagraph text
Label3xs–3xlForm labels, captions
PriceHeading2xs–3xlFinancial amounts
ArticleBodyxs–3xlLong-form content
ArticleHeadingxs–3xlArticle section titles

Usage

vue
<script setup>
import { Heading, Body, Label } from '@yellowcard/b2b-design-system';
</script>

<template>
  <Heading size="lg">Account Overview</Heading>
  <Body size="md">Your current balance and recent transactions.</Body>
  <Label size="sm">Last updated: 2 hours ago</Label>
</template>

Font Weights

WeightTokenUsage
400$font-weight-regularBody text
500$font-weight-mediumLabels, buttons
600$font-weight-semiboldHeadings
700$font-weight-boldDisplay, emphasis

SCSS Tokens

scss
@use '@yellowcard/b2b-design-system/scss/typography' as *;

.custom-heading {
  font-size: $font-size-heading-lg;
  font-weight: $font-weight-semibold;
  line-height: $line-height-heading-lg;
}

See Typography Tokens for the full list of size and line-height tokens.