Skip to content

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.

Leave a gift in your will and help future generations. Clear prices, honest advice and no surprises along the way.

2Inline-block inside a sentence

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

Last edited by Ella Silva and Mateo Mensah yesterday.

3Inbox preview

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

  • Kenji MoreauWhat happens after a disaster appeal – Every donation is tax-deductible, and receipts arrive by email instantly. Every detail is handled by people who care about getting it right.
  • Ethan DelgadoA beginner's guide to getting started – Our annual report is independently audited and published in full. Volunteers give their time in schools, shelters and food banks every week.
  • Freya MorganStories from the families we support – A school kit costs less than a cinema ticket and lasts a whole year. We have helped more than two hundred thousand people since we started.

4Table cell notes

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

OrderNoteTotal
#ORD-8771Start in minutes and get help from a real person whenever you need it.$156.54
#TX-5727You receive photos and updates showing exactly what your donation achieved.$361.13
#PO-8045Friendly people answer your questions quickly, by phone, chat or email.$44.43

5Long file names

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

  • how-to-choose-the-right-campaign-final-version-4.docx115 KB
  • the-small-habits-that-make-a-big-difference-final-version-7.docx863 KB
  • how-your-donations-built-three-new-classrooms-final-version-6.docx373 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.

Zoe Kim replied: Local partners know their communities and make sure help arrives where it matters.yesterday

8Equal card titles

Truncated titles keep a grid of cards the same height.

Why we plant trees with the schools we build: A school kit costs less than a cinema ticket and lasts a whole year.

Jul 6, 2026

A beginner's guide to getting started: Start in minutes and get help from a real person whenever you need it.

Aug 4, 2026

Inside the shelter: from rescue to new home: We keep things simple, so you can focus on what matters to you.

Aug 5, 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.

Health kit Health edition
$32.99
School kit Education edition
$29.00
Library books Education edition
$47.00
Tree planting Environment edition
$11.00

12Truncated chips

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

A day in the life of a volunteerWhy monthly giving makes such a differenceTen ways to fundraise with friendsHow to choose the right campaign

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

Every detail is handled by people who care about getting it right. We measure success by how many donors come back and tell their friends.
New

With min-width: 0

Monthly gifts let us plan ahead and respond quickly when disaster strikes. Clean water wells are built with and maintained by local communities.
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
Our yearly impact report, explained
The small habits that make a big difference
Doing
Our favourite tips for busy weeks
Five things we learned this year
Done
How your donations built three new classrooms
What our donors asked us most

17Order summary address

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

Ivy Alvarez, 365 Maple Avenue, Vancouver 88090, Canada 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. Every donation makes a difference2:42
  2. Stand with families in need3:46
  3. Real help, where it is needed most3:36

20Full text in a tooltip

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

Leave a gift in your will and help future generations. We have helped more than two hundred thousand people since we started.