Typography utilities
Alignment
.eui-textLeft
className
Changes the elementβs text alignment to the left/starting side of its container.
.eui-textRight
className
Changes the elementβs text alignment to the right/ending side of its container.
Wrapping
euiTextTruncate(maxWidth?)
function
Truncates text at 100% width of its parent and will display an ellipsis.
This utility accepts a single optional parameter for customizing the maximum width of the truncated text. If not passed, it defaults to max-width: 100%;
.
Tip: When truncating text, it is recommended to include the full text within an HTML title attribute or by wrapping the element within an EuiToolTip.
euiTextBreakWord()
function
Wraps the text across lines like normal, but forces long words like URLs to break.
.eui-textBreakWord
className
Applies the euiTextBreakWord()
styles as an overriding CSS utility class.
.eui-textBreakAll
className
Wraps the text across lines always forcing the last word on the line to break.
.eui-textBreakNormal
className
Reverts the text back to the normal wrapping scheme of not forcing word breaks.
Numbers
euiNumberFormat(euiTheme)
function
Applies font-feature-settings: "tnum";
so that numbers align more properly in a column, especially when right aligned.
Color
.eui-textInheritColor
className
Forces the component to inherit its text color from its parent.
For changing the color of your text to on of the named colors,
use EuiText or EuiTextColor.