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}; `
'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>