Skip to content
Patternfly Logo

Truncate

Info alert:Beta feature

This Beta component is currently under review and is still open for further evolution. It is available for use in product. Beta components are considered for promotion on a quarterly basis. Please join in and give us your feedback or submit any questions on the PatternFly forum or via Slack. To learn more go to our Beta components page on GitHub.

Examples

Default

Vestibulum interdum risus et enim faucibus, sit amet molestie est accumsan.

Middle

redhat_logo_black_and_white_reversed_simple_with_fedora_container.zip

Start

Vestibulum interdum risus et enim faucibus, sit amet molestie est accumsan.

Default with tooltip at the bottom

Vestibulum interdum risus et enim faucibus, sit amet molestie est accumsan.

Props

Truncate

*required
NameTypeDefaultDescription
contentrequiredstringText to truncate
classNamestringClass to add to outer span
position'start' | 'middle' | 'end''end'Where the text will be truncated
tooltipPositionTooltipPosition | 'auto' | 'top' | 'bottom' | 'left' | 'right' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end' | 'left-start' | 'left-end' | 'right-start' | 'right-end''top'Tooltip position
trailingNumCharsnumber7The number of characters displayed in the second half of the truncation

View source on GitHub