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 settings

Font settings

euiTheme.font.family token

The whole font family stack for all parts of the UI. We encourage only customizing the first font in the stack.

All of EUI defaults to the base font.family. However, you can use this token to change specific instances.

'Inter', BlinkMacSystemFont, Helvetica, Arial, sans-serif

โœ„๐˜—
tsx code block:
โœ„๐˜—css` font-family: ${euiTheme.font.family}; `

euiTheme.font.familyCode token

The font family used for monospace UI elements like EuiCode

'Roboto Mono', Menlo, Courier, monospace

โœ„๐˜—
tsx code block:
โœ„๐˜—css` font-family: ${euiTheme.font.familyCode}; `

euiTheme.font.familySerif token

The font family used for serif UI elements like blockquotes within EuiText

Georgia, Times, Times New Roman, serif

โœ„๐˜—
tsx code block:
โœ„๐˜—css` font-family: ${euiTheme.font.familySerif}; `

euiTheme.font.featureSettings token

Controls advanced features OpenType fonts.

https://developer.mozilla.org/en-US/docs/Web/CSS/font-feature-settings

'calt' 1, 'kern' 1, 'liga' 1

โœ„๐˜—
tsx code block:
โœ„๐˜—css` font-feature-settings: ${euiTheme.font.featureSettings}; `

euiTheme.font.defaultUnits token

Sets the default units used for font size & line height set by UI components like EuiText or EuiTitle. Defaults to rem.

Note: This may override by some internal usages, e.g. EuiText's relative size which must use em.

Hello world

โœ„๐˜—
tsx code block:
โœ„๐˜—<EuiProvider modify={{ font: { defaultUnits: 'px' } }}> <EuiText> <p>Hello world</p> </EuiText> </EuiProvider>
Edit this page

Previous
Font weight
Next
Utilities
  • euiTheme.font.family token
  • euiTheme.font.familyCode token
  • euiTheme.font.familySerif token
  • euiTheme.font.featureSettings token
  • euiTheme.font.defaultUnits token
EUI is dual-licensed under Elastic License 2.0 and Server Side Public License, v 1 | Crafted with โค by Elastic