Skip to content
PluginStats

tailwindcss-capsize weekly downloads statistics

By stormwarning (3 listings) · npm · Tailwind plugins

TailwindCSS leading-trim utility classes.

View on npm Fresh · Dec 6, 2026

tailwindcss-capsize has 6,641 recorded weekly downloads on npm, an increase of 4.7% over the past 30 days, ranking #1426 of 3,247 tracked listings.

Weekly downloads
6,641
Official API · Dec 5, 2026
7-day growth
+20.4%
+1.1K weekly downloads
30-day growth
+4.7%
+297 weekly downloads
90-day growth
+28.7%
+1.5K weekly downloads
Rank
#1426
▲ 38 in 7 days

About tailwindcss-capsize

tailwindcss-capsize

npm version

A TailwindCSS plugin that generates text-box-trim utility classes using Capsize.

npm install --save-dev tailwindcss-capsize

text-box-trim?

Formerly known as leading-trim, a proposed CSS property to remove the extra space from text bounding boxes, which affects optical alignment. This article from Microsoft Design outlines the problem and how the proposed solution works.

Configuration

A JavaScript config file is required due to the values needed by the plugin.

@config "../tailwind.config.js";

Other Tailwind settings can be configured through CSS directives or included in the config file.

This plugin requires a fontMetrics key added to your Tailwind theme. It should be an object with keys matching those in your fontFamily definitions, and each key should have an object of the following shape:

{
	ascent: number
	descent: number
	lineGap: number
	unitsPerEm: number
	capHeight: number
}

These values can be determined by using the Capsize website, fontkit, FontDrop!, or some other means.

A full example
// tailwind.config.js
import pluginCapsize from 'tailwindcss-capsize'
export default {
	theme: {
		fontFamily: {
			sans: ['Inter', 'sans-serif'],
		},
		fontMetrics: {
			// Keys here must match those in fontFamily.
			sans: {
				capHeight: 2048,
				ascent: 2728,
				descent: -680,
				lineGap: 0,
				unitsPerEm: 2816,
			},
		},
		// ...
	},
	plugins: [pluginCapsize],
}

Usage

The new .capsize utility class should be applied to the direct parent element surrounding a text node. This class requires font-family, font-size, and line-height utilities to be applied at some point above it in the cascade in order for the required custom properties to be available.

<!-- Example using default TailwindCSS config -->

<p class="font-sans text-base leading-none capsize">Lorem ipsum dolor</p>

Options

rootSize
type: number (optional, default: 16)

The plugin assumes a root font-size of 16px when converting from rem values. To use a different value, pass it in (without units) to the plugin options.

pluginCapsize({ rootSize: 12 })
className
type: string (optional, default: 'capsize')

The default .capsize utility class can be replaced with a custom class name if preferred.

pluginCapsize({ className: 'leading-trim' })

Tips and tricks

Text truncation and line clamping

Sometimes an interface calls for truncating text to a single line or clamping text to a specified number of lines. Applying these methods to the same element that the default .capsize class is applied to will cause issues since the class assigns pseudo ::before and ::after elements to that element.

<!-- ❌ Does NOT work -->

<p class="font-sans text-base leading-none capsize truncate">
	Text to be truncated to a single line
</p>

To solve this, a child element to the element with the .capsize class should wrap the text. This element should receive the styling to truncate or line clamp.

<!-- ✅ Does work! -->

<p class="font-sans text-base leading-none capsize">
	<span class="truncate">Text to be truncated to a single line</span>
</p>

Related

🔡 tailwindcss-opentype — Utility classes for advanced typographic features.

Description from the npm listing.

  • tailwindcss
  • tailwindcss-plugin
  • capsize
  • leading-trim
  • text-box
  • text-box-trim
  • typography
  • whitespace

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-capsize weekly downloads on npm, last 90 days: 6,641 weekly downloads as of Dec 5, 2026, +28.7% over 90 days.tailwindcss-capsizeWeekly downloads on npm · Last 90 days6,641downloads / week+28.7% over 90 days02K4K6K8K10KSep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
tailwindcss-capsize weekly downloads on npm, last 90 days: 6,641 weekly downloads as of Dec 5, 2026, +28.7% over 90 days.

7/30/90-day growth

tailwindcss-capsize weekly downloads growth on npm: +20.4% over 7 days, +4.7% over 30 days, +28.7% over 90 days.tailwindcss-capsizeWeekly downloads growth on npm6,641downloads / week now7-day growth+1,123 weekly downloads+20.4%30-day growth+297 weekly downloads+4.7%90-day growth+1,481 weekly downloads+28.7%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
tailwindcss-capsize weekly downloads growth on npm: +20.4% over 7 days, +4.7% over 30 days, +28.7% over 90 days.

Ranking history

tailwindcss-capsize npm ranking history: currently #1426 (by weekly downloads).tailwindcss-capsizenpm ranking · by weekly downloads · Last 90 days#1426current rank#1150#1200#1250#1300#1350#1400#1450#1500Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 18, 2026 – Dec 6, 2026 · 44 observations · Updated Dec 5, 2026pluginstats.com
tailwindcss-capsize npm ranking history: currently #1426 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,083 shown · page 72, #6 (overall #1,426)
All npm: every listing in weekly downloads order

Listing placement

Tailwind plugins292 listings · 15 pages · page 1, #13 (overall #13)
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-capsize
Date (UTC)Weekly downloadsChange vs. previous
6,641-48
6,689-9
6,698+31
6,667+473
6,194+316
5,878+283
5,595+77
5,518+79
5,439-307
5,746+116
5,630+31
5,599-205
5,804-267
6,071—

Similar npm Tailwind plugins plugins

All 20 tailwindcss-capsize 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-capsize. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.