Truncate
Use Truncate to shorten overflowing text with an ellipsis.
Page navigation navigation
React
ready
Rails
ready
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
| Name | Default | Description |
|---|---|---|
maxWidth | 125 | numberSets the max-width of the text. |
inline | false | booleanDisplays text as inline block and vertical aligns to the top. |
expandable | false | booleanAllows the truncated text to be displayed on hover. |
as | 'div' | React.ElementType |
sx Deprecated | SystemStyleObject |