Truncate
Use Truncate to shorten overflowing text with an ellipsis.
On this page
On this page
Import
import {Truncate} from '@primer/react'
Examples
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 | SystemStyleObject |