Skip to content
PluginStats

tw-spacing-semantics-plugin weekly downloads statistics

By GeronimoGM · npm · Tailwind plugins

Semantic spacing utilities for Tailwind CSS v4 — isolated p-*, m-*, and gap-* classes built on --space-* custom properties. Fully independent from Tailwind's native spacing scale.

View on npm Fresh · Dec 6, 2026

tw-spacing-semantics-plugin has 17 recorded weekly downloads on npm, an increase of 30.8% over the past 30 days, ranking #3024 of 3,247 tracked listings.

Weekly downloads
17
Official API · Dec 5, 2026
7-day growth
-10.5%
-2 weekly downloads
30-day growth
+30.8%
+4 weekly downloads
90-day growth
+54.5%
+6 weekly downloads
Rank
#3024
▼ 199 in 7 days

About tw-spacing-semantics-plugin

tw-spacing-semantics-plugin

A production-ready Tailwind CSS v4 plugin that adds a semantic spacing layer — p-md, gap-xl, mx-2xl, top-lg — built on an isolated --space-* custom property system that never touches Tailwind's own spacing scale.


Why this exists

Tailwind's built-in spacing utilities use numeric keys: p-4, gap-8, mt-12. These are structural primitives tied to the raw --spacing unit. They work great for low-level layout work, but design systems benefit from named, semantic tokens: is this the "comfortable" padding or the "tight" padding?

Also, changing --spacing-xl, for example, will modify classes that already have semantic variants such as max-w-xl, forcing you to create your custom spacings with another prefix like max-w-s-xl.

This plugin adds that semantic layer without touching Tailwind's internals. Utilities like max-w-xl, w-4, h-screen, and gap-8 continue working exactly as Tailwind intended.

The default token scale is based on the concepts of Refactoring UI by Adam Wathan & Steve Schoger. Yes, the Tailwind creators!.


Features

  • Fully isolated --space-* namespace — zero interference with Tailwind internals
  • Generates only p-*, m-*, -m-*, top-*/right-*/bottom-*/left-*, gap-*, space-x-*/space-y-*, their negative variants and logical (ms-*, pe-*, mbs-*, …) utilities
  • Two-level customization: global scale factor + individual token override
  • Native Tailwind v4 responsive variants (sm:px-xl, md:gap-2xl)
  • CSS-first, ESM, npm-publishable
  • JIT tree-shakable — only used utilities appear in output
  • Zero Tailwind internals mutated

Installation

pnpm add tw-spacing-semantics-plugin

Setup

In your Tailwind v4 CSS entry file:

@import 'tailwindcss';
@import 'tw-spacing-semantics-plugin';

That's it. All semantic utilities are now available.


Default token reference

At Tailwind's default --spacing: 0.25rem:

TokenMultiplierValue (rem)Value (px)
none—00px
3xs× 0.50.125rem2px
2xs× 10.25rem4px
xs× 20.5rem8px
sm× 30.75rem12px
md× 41rem16px
lg× 61.5rem24px
xl× 82rem32px
2xl× 123rem48px
3xl× 164rem64px
4xl× 246rem96px
5xl× 328rem128px
6xl× 4812rem192px
7xl× 6416rem256px
8xl× 9624rem384px
9xl× 12832rem512px
10xl× 19248rem768px
11xl× 25664rem1024px

Generated utilities

Every token is available across spacing axes.

Padding
Classes generated
p-{t} px-{t} py-{t} pt-{t} pr-{t} pb-{t} pl-{t}
ps-{t} pe-{t} pbs-{t} pbe-{t} (logical)

Padding does NOT support negative values.


Margin and negative margin
Classes generated
m-{t} mx-{t} my-{t} mt-{t} mr-{t} mb-{t} ml-{t} ms-{t} me-{t} mbs-{t} mbe-{t}
-m-{t} -mx-{t} -my-{t} -mt-{t} -mr-{t} -mb-{t} -ml-{t}
-ms-{t} -me-{t} -mbs-{t} -mbe-{t} (logical)

Logical margins (ms/me/mbs/mbe) follow the writing direction of the document, so they flip automatically in RTL layouts. Their negative variants are also supported.


Gap
Classes generated
gap-{t} gap-x-{t} gap-y-{t}

Gap does NOT support negative values in CSS.


Space between children
Classes generated
space-x-{t} space-y-{t}
-space-x-{t} -space-y-{t}

Applies the semantic token as spacing between sibling elements (margin-based, like Tailwind's native space-x-*/space-y-*). Negative variants collapse the space between siblings.


Inset (positioning)
Classes generated
inset-{t} inset-x-{t} inset-y-{t}
-inset-{t} -inset-x-{t} -inset-y-{t}
top-{t} right-{t} bottom-{t} left-{t}
-top-{t} -right-{t} -bottom-{t} -left-{t}

Only the classes you actually used will appear in the final CSS.


Usage

<!-- Semantic padding -->
<article class="p-md">…</article>

<!-- Responsive semantic padding -->
<section class="px-sm sm:px-md lg:px-xl">…</section>

<!-- Semantic gap in a grid -->
<div class="grid grid-cols-3 gap-lg">…</div>

<!-- Responsive gap -->
<div class="flex flex-col gap-sm md:gap-lg">…</div>

<!-- Margin -->
<div class="mt-md mb-lg">…</div>

<!-- Negative margin -->
<div class="-mt-md -mb-lg"></div>

<!-- Horizontal negative margin -->
<div class="-mx-xl"></div>

<!-- Semantic inset positioning -->
<div class="top-md left-lg">…</div>

<!-- Inset shorthand -->
<div class="inset-lg inset-x-md inset-y-sm">…</div>

<!-- Negative inset -->
<div class="-top-sm -right-md -inset-x-xl">…</div>…

Description from the npm listing.

  • tailwindcss
  • tailwindcss-plugin
  • tailwind-v4
  • tailwind-css-v4
  • spacing
  • semantic-spacing
  • design-tokens
  • design-system
  • css-custom-properties
  • padding
  • margin
  • gap
  • refactoring-ui

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

tw-spacing-semantics-plugin weekly downloads on npm, last 90 days: 17 weekly downloads as of Dec 5, 2026, +54.5% over 90 days.tw-spacing-semantics-pluginWeekly downloads on npm · Last 90 days17downloads / week+54.5% over 90 days0510152025Sep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
tw-spacing-semantics-plugin weekly downloads on npm, last 90 days: 17 weekly downloads as of Dec 5, 2026, +54.5% over 90 days.

7/30/90-day growth

tw-spacing-semantics-plugin weekly downloads growth on npm: -10.5% over 7 days, +30.8% over 30 days, +54.5% over 90 days.tw-spacing-semantics-pluginWeekly downloads growth on npm17downloads / week now7-day growth-2 weekly downloads-10.5%30-day growth+4 weekly downloads+30.8%90-day growth+6 weekly downloads+54.5%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
tw-spacing-semantics-plugin weekly downloads growth on npm: -10.5% over 7 days, +30.8% over 30 days, +54.5% over 90 days.

Ranking history

tw-spacing-semantics-plugin npm ranking history: currently #3024 (by weekly downloads).tw-spacing-semantics-pluginnpm ranking · by weekly downloads · Last 90 days#3024current rank#2000#2200#2400#2600#2800#3000#3200Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 18, 2026 – Dec 6, 2026 · 44 observations · Updated Dec 5, 2026pluginstats.com
tw-spacing-semantics-plugin npm ranking history: currently #3024 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,084 shown · page 152, #6 (overall #3,026)
All npm: every listing in weekly downloads order

Listing placement

Tailwind plugins292 listings · 15 pages · page 10, #17 (overall #197)
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 tw-spacing-semantics-plugin
Date (UTC)Weekly downloadsChange vs. previous
17+2
15-4
19+9
10-1
11-1
12-4
16-3
190
19+4
15-1
16-5
210
21+5
16—

Similar npm Tailwind plugins plugins

All 20 tw-spacing-semantics-plugin 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/tw-spacing-semantics-plugin. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.