Skip to main content
Elastic UI
Elastic UI
ComponentsPatternsContentData visualization
EUI ChangelogGitHubFigma
  • Guidelines
    • Getting started
    • Accessibility
    • Writing
    • Testing
  • Theming
    • Theme provider
    • Color mode
    • High contrast mode
    • Borders
    • Breakpoints
    • Colors
    • Sizing
    • Typography
      • Font scale
      • Font weight
      • Font settings
      • Utilities
  • Templates
    • Page template
    • Sitewide search
  • Layout
    • Accordion
    • Bottom bar
    • Flex
    • Flyout
    • Header
    • Horizontal rule
    • Modal
    • Page components
    • Page header
    • Panel
    • Popover
    • Resizable container
    • Spacer
  • Navigation
    • Breadcrumbs
    • Buttons
    • Collapsible nav
    • Context menu
    • Facet
    • Key pad menu
    • Link
    • Pagination
    • Side nav
    • Steps
    • Tabs
    • Tree view
  • Display
    • Aspect ratio
    • Avatar
    • Badge
    • Callout
    • Card
    • Comment list
    • Description list
    • Drag and drop
    • Empty prompt
    • Health
    • Icons
    • Image
    • List group
    • Loading
    • Progress
    • Skeleton
    • Stat
    • Text
    • Timeline
    • Title
    • Toast
    • Tooltip
    • Tour
  • Forms
    • Form controls
    • Form layouts
    • Form validation
    • Text controls
    • Numeric controls
    • Selection controls
    • Search and filter controls
    • Date and time controls
    • Other controls
  • Tabular content
    • Tables
    • Data grid
  • Editors & Syntax
    • Code
    • Markdown
  • Utilities
    • Accessibility
    • Auto sizer
    • Beacon
    • Color palettes
    • Copy
    • CSS utility classes
    • Delay
    • Error boundary
    • Focus trap
    • Highlight and mark
    • HTML ID generator
    • I18n
    • Inner text
    • Mutation observer
    • Outside click detector
    • Overlay mask
    • Portal
    • Pretty duration
    • Provider
    • Resize observer
    • Scroll
    • Text diff
    • Text truncation
    • Window events
  • EUI
  • Theming
  • 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
Font scale
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