Truncate

Use Truncate to shorten overflowing text with an ellipsis.

Page navigation navigation

React
readyNot reviewed for a11y
Rails
readyNot reviewed for a11y

React examples

Default

Some example text

Fit to parent

Some example text

Custom max-width

Some example text

Expand on hover

Hover this example text

Props

Truncate

NameRequiredDescription
maxWidth
number
Sets the max-width of the text.
inline
boolean
Displays text as inline block and vertical aligns to the top.
expandable
boolean
Allows the truncated text to be displayed on hover.
as
React.ElementType
sx
SystemStyleObject