Skip to main content
Elastic UI
Elastic UI
Getting startedComponentsPatternsContentData visualization
EUI ChangelogGitHubFigma
  • Setup
  • Theming
    • Theme provider
    • Tokens
      • Borders
      • Breakpoints
      • Colors
      • Sizing
      • Typography
        • Font weight
        • Font settings
        • Font scale hook
    • Color mode
    • High contrast mode
    • Utilities
  • Accessibility
  • Testing
  • Utilities
  • EUI
  • Theming
  • Tokens
  • Typography
  • Font weight

Font weight


EUI establishes a set of 5 font-weights based on their numeric keywords values. When importing the font-family from your service of choice, ensure that you have all 5 weights contained in your import. See the

Getting Started page for details on importing fonts.

euiTheme.font.weight[weight] token

To maintain consistency, EUI establishes the font weight patterns directly in the text and title components. However, we recommend using the theme keys instead of font-weight: bold in your css to ensure proper rendering with the imported font family.

I am proper bold

โœ„๐˜—
tsx code block:
โœ„๐˜—css` font-weight: ${euiTheme.font.weight.bold}; `
๐˜‚๐˜‚
โœ„๐˜—โœ„๐˜—
Sample
โ†ฆ
Token
โ†ฆ
Value
โ†ต
Sample
Aa
โ†ฆ
Token
font.weight.light
โ†ฆ
Value
300
โ†ต
Sample
Aa
โ†ฆ
Token
font.weight.regular
โ†ฆ
Value
400
โ†ต
Sample
Aa
โ†ฆ
Token
font.weight.medium
โ†ฆ
Value
450
โ†ต
Sample
Aa
โ†ฆ
Token
font.weight.semiBold
โ†ฆ
Value
500
โ†ต
Sample
Aa
โ†ฆ
Token
font.weight.bold
โ†ฆ
Value
600
โ†ต
๐˜‚๐˜‚

Variable fonts

EUI also supports variable font families which can be imported from Google fonts using their new API. Though we still recommend sticking to the theme token names.

400

The quick brown fox

โœ„๐˜—
jsx code block:
โœ„๐˜—css` font-weight: ${euiTheme.font.weight.regular}; `
Edit this page

Previous
Typography
Next
Font settings
  • euiTheme.font.weight[weight] token
  • Variable fonts
EUI is dual-licensed under Elastic License 2.0 and Server Side Public License, v 1 | Crafted with โค by Elastic