Did you know?dyk.si

Truncation (Ellipsis)

When text is longer than its space, it gets cut and ends with "…".

Also known as: Ellipsis

text-overflow: ellipsis / line-clamp

When to use it

In tables and lists where space is tight.

Common mistake

Don’t truncate prices, numbers, or key names.

Accessibility

Keep the full text reachable through a tooltip or an expand link.

Name in code

HTML/CSStext-overflow: ellipsis / line-clamp
ReactclassName="truncate"
Jetpack Composeoverflow = TextOverflow.Ellipsis
SwiftUI.lineLimit(1).truncationMode(.tail)

Ready prompt for your coding agent

Add a Truncation (Ellipsis) to this screen. What it is: When text is longer than its space, it gets cut and ends with "…". Implement with: text-overflow: ellipsis / line-clamp (HTML/CSS). Accessibility: Keep the full text reachable through a tooltip or an expand link. When to use it: In tables and lists where space is tight. Avoid: Don’t truncate prices, numbers, or key names. Reuse the project's existing design tokens, spacing and component conventions.

Or compose a whole page from this element and others →

Prompts are in English for the most precise results with coding agents.