Skip to content

Text Overflow

Handle text overflow

Syntax

visual="[overflow-value]"

Values

ValueCSS OutputDescription
truncateoverflow: hidden; text-overflow: ellipsis; white-space: nowrapTruncate with ellipsis
text-ellipsistext-overflow: ellipsisEllipsis overflow
text-cliptext-overflow: clipClip overflow

Examples

html
<div visual="truncate">Very long text that gets truncated...</div>

Preview

Text Overflow

visual="truncate" - Handle overflowing text

This long text will be truncated with ellipsis
This long text will be clipped without ellipsis
View Code
html
<div layout="flex:col" space="g:small p:medium" visual="bg:neutral-100 dark:bg:neutral-900 rounded:medium">
  <div space="p:small w:[150px]" visual="bg:primary text:white rounded:small truncate">This long text will be truncated with ellipsis</div>
  <div space="p:small w:[150px]" visual="bg:success text:white rounded:small text-clip">This long text will be clipped without ellipsis</div>
</div>