Skip to content
PluginStats

tailwindcss-text-box-trim weekly downloads statistics

By michaelcummings12 · npm · Tailwind plugins

Tailwind CSS utility classes for leading-trim, text-box-trim, and text-box-edge

View on npm Fresh · Dec 6, 2026

tailwindcss-text-box-trim has 284 recorded weekly downloads on npm, an increase of 5.2% over the past 30 days, ranking #2399 of 3,247 tracked listings.

Weekly downloads
284
Official API · Dec 5, 2026
7-day growth
+18.3%
+44 weekly downloads
30-day growth
+5.2%
+14 weekly downloads
90-day growth
-36.3%
-162 weekly downloads
Rank
#2399
▼ 63 in 7 days

About tailwindcss-text-box-trim

<img src="./assets/logo.svg" width="32" height="32" style="display: inline-block; vertical-align: middle;" /> tailwindcss-text-box-trim

Perfect typography spacing for Tailwind CSS v4+

npm version GitHub GitHub stars

Before and after comparison of text-box-trim behavior

<sub>Before: Standard text with excess space. After: Text with text-box-trim applied, removing the excess space for perfect alignment.</sub>

Create pixel-perfect typographical layouts with precise control over the vertical spacing of text 🤩

Eliminate annoying leading whitespace and cap-height alignment issues with standard CSS. This package provides Tailwind CSS utilities for the CSS Text Box Trim specification.

Why use this?

Standard web typography often includes "internal leading" (extra space above and below the text glyphs) which makes it difficult to align text containers precisely with images, buttons, or other elements.

text-box-trim solves this by cropping that extra space, making your text behave more like a standard box model element.

Use text-box-trim along with text-box-edge to control which sides of the text box are trimmed and how much space to trim.

Installation

Install the package via npm:

npm install tailwindcss-text-box-trim

Usage

This package is designed for Tailwind CSS v4+.

Import the CSS in your main CSS file (e.g., global.css):

@import "tailwindcss";
@import "tailwindcss-text-box-trim";

Browser Support

text-box-trim is baseline available in Chrome 133+ and Safari 18.2+.

Firefox support is pending.

Can I use

Utilities
box-trim-*

Control which sides of the text box are trimmed.

  • box-trim-both: Trims space from both start (top) and end (bottom).
  • box-trim-start: Trims space from the start (top) only.
  • box-trim-end: Trims space from the end (bottom) only.
  • box-trim-none: Removes trimming.
box-edge-*

Define the reference edge for trimming.

  • box-edge-text: Trims to the text edge (default).
  • box-edge-cap: Trims to the cap height (top of capital letters). Perfect for aligning headers.
  • box-edge-ex: Trims to the x-height.
  • box-edge-alphabetic: Trims to the alphabetic baseline.
  • box-edge-ideographic: Trims to the ideographic baseline (CJK).
Usage with tailwind-merge

Since these utilities do not collide with standard Tailwind classes (like text-* colors or sizes), configuration is optional.

However, if you want to support deduplication (e.g., ensuring box-trim-both overrides box-trim-none properly when both are present), you can configure it as follows:

import { extendTailwindMerge } from "tailwind-merge";

export const twMerge = extendTailwindMerge({
  extend: {
    classGroups: {
      "box-trim": [{ "box-trim": ["both", "start", "end", "none"] }],
      "box-edge": [
        { "box-edge": ["text", "cap", "ex", "alphabetic", "ideographic"] },
      ],
    },
  },
});

Description from the npm listing.

  • box-edge
  • box-trim
  • cap height trimming
  • css
  • css spacing
  • css-spacing
  • leading trim
  • leading-trim
  • tailwind
  • tailwind css
  • tailwind-css
  • tailwindcss
  • tailwindcss plugin
  • tailwindcss-plugin
  • text box
  • text box edge
  • text box trim
  • text spacing
  • text-box
  • text-box-edge

README badge

Show your rank in a README or on your website. The badge updates automatically.

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

tailwindcss-text-box-trim weekly downloads on npm, last 90 days: 284 weekly downloads as of Dec 5, 2026, -36.3% over 90 days.tailwindcss-text-box-trimWeekly downloads on npm · Last 90 days284downloads / week-36.3% over 90 days0100200300400500600700Sep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
tailwindcss-text-box-trim weekly downloads on npm, last 90 days: 284 weekly downloads as of Dec 5, 2026, -36.3% over 90 days.

7/30/90-day growth

tailwindcss-text-box-trim weekly downloads growth on npm: +18.3% over 7 days, +5.2% over 30 days, -36.3% over 90 days.tailwindcss-text-box-trimWeekly downloads growth on npm284downloads / week now7-day growth+44 weekly downloads+18.3%30-day growth+14 weekly downloads+5.2%90-day growth-162 weekly downloads-36.3%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
tailwindcss-text-box-trim weekly downloads growth on npm: +18.3% over 7 days, +5.2% over 30 days, -36.3% over 90 days.

Ranking history

tailwindcss-text-box-trim npm ranking history: currently #2399 (by weekly downloads).tailwindcss-text-box-trimnpm ranking · by weekly downloads · Last 90 days#2399current rank#1400#1600#1800#2000#2200#2400#2600Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 18, 2026 – Dec 6, 2026 · 44 observations · Updated Dec 5, 2026pluginstats.com
tailwindcss-text-box-trim npm ranking history: currently #2399 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,084 shown · page 120, #19 (overall #2,399)
All npm: every listing in weekly downloads order

Listing placement

Tailwind plugins292 listings · 15 pages · page 4, #4 (overall #64)
Tailwind plugins: every listing in weekly downloads order

Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.

Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.

Recent observations

Full history (170)
Recent weekly downloads observations for tailwindcss-text-box-trim
Date (UTC)Weekly downloadsChange vs. previous
284+11
273+1
272-2
274+25
249+28
2210
221-19
240-5
245-4
249+30
219+54
165-18
183-9
192—

Similar npm Tailwind plugins plugins

All 20 tailwindcss-text-box-trim alternatives

Data source

Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.

Listing: https://www.npmjs.com/package/tailwindcss-text-box-trim. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.