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.

Monthly gifts let us plan ahead and respond quickly when disaster strikes. 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 Diego Hughes and Hana Harlow 11 hours ago.

3Inbox preview

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

  • Chloe MorganHow to choose the right campaign – 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.
  • Nadia DelgadoWhy we plant trees with the schools we build – Companies can match employee donations and double their impact. We measure success by how many donors come back and tell their friends.
  • Mason PatelTen ways to fundraise with friends – Ninety cents of every dollar goes directly to the projects you support. You receive photos and updates showing exactly what your donation achieved.

4Table cell notes

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

OrderNoteTotal
#ORD-4571Our team has done this many times, so you never have to guess.$139.26
#TX-7582Leave a gift in your will and help future generations.$79.99
#ORD-5409We listen first, then build a plan around what you actually need.$312.45

5Long file names

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

  • why-monthly-giving-makes-such-a-difference-final-version-9.docx442 KB
  • meet-the-partners-behind-our-water-projects-final-version-4.docx348 KB
  • stories-from-the-families-we-support-final-version-6.docx787 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.

Luna Ashford replied: Every donation is tax-deductible, and receipts arrive by email instantly.yesterday

8Equal card titles

Truncated titles keep a grid of cards the same height.

Why we plant trees with the schools we build: Thousands of donors already trust us, and we work hard to keep it that way.

Oct 10, 2025

Our favourite tips for busy weeks: Clean water wells are built with and maintained by local communities.

Oct 9, 2026

A beginner's guide to getting started: Every detail is handled by people who care about getting it right.

Dec 20, 2025

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.

Tree planting Environment edition
$9.00
School kit Education edition
$29.00
Monthly gift Relief edition
$25.00
Health kit Health edition
$38.00

12Truncated chips

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

What our donors asked us mostLooking back at a busy seasonWhy monthly giving makes such a differenceA day in the life of a volunteer

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

We keep things simple, so you can focus on what matters to you. Clear prices, honest advice and no surprises along the way.
New

With min-width: 0

Monthly gifts let us plan ahead and respond quickly when disaster strikes. Start in minutes and get help from a real person whenever you need it.
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
How to choose the right campaign
Doing
How your donations built three new classrooms
Ten ways to fundraise with friends
Done
Five things we learned this year
Our yearly impact report, explained

17Order summary address

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

Maya Novak, 400 Hillcrest Road, Toronto 54111, 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. Your kindness travels further than you think4:06
  2. Small acts, big impact3:14
  3. Change one life, change a community5:01

20Full text in a tooltip

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

Companies can match employee donations and double their impact. We keep things simple, so you can focus on what matters to you.