Truncate
Use Truncate to shorten overflowing text with an ellipsis.
On this page
- @primer/react@37.2.0
- Alpha
- Not reviewed for accessibility
On this page
Import
import {Truncate} from '@primer/react'
Examples
Props
Truncate
Name | Default | Description |
---|---|---|
maxWidth | 125 | number Sets the max-width of the text. |
inline | false | boolean Displays text as inline block and vertical aligns to the top. |
expandable | false | boolean Allows the truncated text to be displayed on hover. |
as | 'div' | React.ElementType |
sx | SystemStyleObject |