Skip to content
Lumen Co

Text Truncation

The text-truncate helper shortens long text to a single line and ends it with an ellipsis. It needs a block or inline-block element with a width limit; in flex layouts give the flexible item min-width: 0.

1Block level truncation

A block element with a max width; the dashed outline shows the limit.

Start in minutes and get help from a real person whenever you need it. Monthly gifts let us plan ahead and respond quickly when disaster strikes.

2Inline-block inside a sentence

Inline elements need d-inline-block plus a max width to truncate.

Last edited by Chloe Carter and Leo Haddad 20 hours ago.

3Inbox preview

Subject and preview text cut to one line in an email list.

  • Ella RossiA day in the life of a volunteer – Clean water wells are built with and maintained by local communities. Clear prices, honest advice and no surprises along the way.
  • Nora KimWhat our donors asked us most – We have helped more than two hundred thousand people since we started. Companies can match employee donations and double their impact.
  • Priya LarsenWhy we plant trees with the schools we build – We listen first, then build a plan around what you actually need. Friendly people answer your questions quickly, by phone, chat or email.

4Table cell notes

A long note column truncated with text-truncate and a max width on the cell.

OrderNoteTotal
#ORD-3151Ninety cents of every dollar goes directly to the projects you support.$284.25
#TX-1456Our team has done this many times, so you never have to guess.$389.66
#ORD-8251Our annual report is independently audited and published in full.$272.67

5Long file names

File names shorten while the size stays visible at the end.

  • our-favourite-tips-for-busy-weeks-final-version-2.docx666 KB
  • how-your-donations-built-three-new-classrooms-final-version-5.docx850 KB
  • the-small-habits-that-make-a-big-difference-final-version-4.docx490 KB

6Breadcrumb with a long last item

The current page title truncates so the breadcrumb stays on one line.

7Notification preview

A toast-like card where the message preview stays on one line.

Theo Novak replied: You receive photos and updates showing exactly what your donation achieved.6 days ago

8Equal card titles

Truncated titles keep a grid of cards the same height.

Why we plant trees with the schools we build: Start in minutes and get help from a real person whenever you need it.

Jul 6, 2026

Why monthly giving makes such a difference: Every donation is tax-deductible, and receipts arrive by email instantly.

Jan 31, 2026

Ten ways to fundraise with friends: Every detail is handled by people who care about getting it right.

Jun 21, 2026

9Chat list

In a flex row the text column needs min-width: 0 so text-truncate can shrink it.

10Long web addresses

Page addresses truncate in a link list; the full address is kept in the title attribute.

11Product grid names

Product names cut to one line under each image in a compact grid.

Vet care Animals edition
$62.00
Clean water well Health edition
$495.00
Solar lamp Environment edition
$18.99
Teacher training Education edition
$126.00

12Truncated chips

Badges with a max width so long labels never break the row.

The small habits that make a big differenceA day in the life of a volunteerOur favourite tips for busy weeksA beginner's guide to getting started

13User menu name

A long account name truncates inside the navbar button.

14Why min-width: 0 matters

Left: a flex child without min-width overflows. Right: with min-width: 0 the text truncates.

Without min-width

Clear prices, honest advice and no surprises along the way. We measure success by how many donors come back and tell their friends.
New

With min-width: 0

Friendly people answer your questions quickly, by phone, chat or email. Our annual report is independently audited and published in full.
New

15Sidebar menu

Project names in a narrow sidebar stay on one line each.

16Kanban card titles

Narrow board columns keep task titles tidy with truncation.

To do
Meet the partners behind our water projects
Looking back at a busy season
Doing
What happens after a disaster appeal
Stories from the families we support
Done
How to choose the right campaign
How your donations built three new classrooms

17Order summary address

A long shipping address truncated in a summary line, with an edit link.

Lucas Ibrahim, 71 Maple Avenue, Auckland 68606, New Zealand Change

18Dropdown with a long value

The selected option truncates inside a fixed width dropdown button.

19Playlist

Long episode or track titles truncate while the duration stays aligned.

  1. Change one life, change a community5:47
  2. Your kindness travels further than you think3:14
  3. Together we can change lives5:09

20Full text in a tooltip

Offer the complete text in a tooltip so nothing is lost when it is truncated.

You receive photos and updates showing exactly what your donation achieved. Clean water wells are built with and maintained by local communities.