Skip to content
PluginStats

tailwindcss-calc weekly downloads statistics

By oswaldohuillca · npm · Tailwind plugins

A Tailwind CSS v4 plugin built entirely with CSS that provides responsive utilities using `calc()` and `clamp()` based on viewport width.

View on npm Fresh · Dec 6, 2026

tailwindcss-calc has 23 recorded weekly downloads on npm, a decrease of 88.7% over the past 30 days, ranking #2962 of 3,247 tracked listings.

Weekly downloads
23
Official API · Dec 5, 2026
7-day growth
+91.7%
+11 weekly downloads
30-day growth
-88.7%
-181 weekly downloads
90-day growth
+188%
+15 weekly downloads
Rank
#2962
▼ 40 in 7 days

About tailwindcss-calc

Tailwind CSS v4 Calc Plugin

A Tailwind CSS v4 plugin built entirely with CSS that provides responsive utilities using calc() and clamp() based on viewport width.

Write the pixel values from your mockup — w-100, p-20, text-32 — and every one of them scales with the viewport. One breakpoint, two design references, no JavaScript.

🚀 Features

  • ✅ 100% CSS - No JavaScript required
  • ✅ Tailwind CSS v4 - Compatible with the latest version
  • ✅ Viewport-based Scaling - All utilities scale responsively using calc() and clamp()
  • ✅ Comprehensive Utilities - Width, height, padding, margin, typography, positioning, and more
  • ✅ One breakpoint - md swaps the base reference; no md: ladder for sizing
  • ✅ Customizable - Set the base widths to match your own mockups

📦 Installation

npm install tailwindcss-calc
# or
bun add tailwindcss-calc
# or
pnpm add tailwindcss-calc

🚀 Quick Start

After installation, create your CSS file:

/* styles.css */
@import "tailwindcss";
@import "tailwindcss-calc";

/* Your two design references — this is the entire configuration */
@layer theme {
  :root {
    --window-width: 375; /* mobile mockup */
  }

  @variant md {
    :root {
      --window-width: 1440; /* desktop mockup */
    }
  }
}

Then use the utilities in your HTML:

<div class="w-500 h-300 p-20 m-10">
  <h1 class="text-32 mb-20">Hello World</h1>
  <p class="text-16 leading-24">Responsive content</p>
</div>

The defaults are already 375 / 1440, so you can skip the @layer theme block entirely if those match your mockups.

🛠️ Development

To run the example locally:

Development
bun run dev
# or: npm run dev

Open your browser at http://localhost:5173 to see the demo.

Build
bun run build
Preview
bun run preview

🎨 How It Works

All utilities use this formula to scale based on viewport width:

calc(value * clamp(0px, 100vw, max-width) / base-width)

The formula is centralized in a single --calc-ratio variable, so every utility multiplies its numeric value by the same viewport-based factor.

Default configuration (mobile-first):

  • Base width: 375px
  • Max width: 375px
  • At the md breakpoint (≥48rem) the base scales up to 1440px

This means w-100 will be:

  • On a 320px screen: ~85px
  • At 375px (design base): 100px
  • Above 375px: 100px (capped) until the md breakpoint
  • At md, base becomes 1440, so 768px → ~53px and 1440px → 100px
  • Above 1440px: 100px (capped)

📚 Available Utilities

Width & Height
<div class="w-100 h-200">...</div>
<div class="size-50">...</div>
<div class="min-w-300 max-w-500">...</div>
<div class="min-h-400 max-h-600">...</div>
Padding
<div class="p-20">...</div>
<div class="px-30 py-40">...</div>
<div class="pt-10 pb-10 pl-15 pr-15">...</div>
Margin
<div class="m-20">...</div>
<div class="mx-auto my-30">...</div>
<div class="mt-10 mb-20 ml-5 mr-5">...</div>
Typography
<h1 class="text-48 leading-60">Title</h1>
<p class="text-16 tracking-2">Paragraph</p>
<span class="word-spacing-4">Text</span>
Gap (Flexbox & Grid)
<div class="flex gap-20">...</div>
<div class="grid gap-x-30 gap-y-40">...</div>
<div class="grid col-gap-25 row-gap-25">...</div>
Border Radius
<div class="rounded-10">...</div>
<div class="rounded-t-20 rounded-b-10">...</div>
<div class="rounded-l-8 rounded-r-8">...</div>
Positioning
<div class="top-50 left-100">...</div>
<div class="bottom-20 right-30">...</div>
<div class="inset-10">...</div>
<div class="inset-x-20 inset-y-30">...</div>
Transform
<div class="translate-x-50">...</div>
<div class="translate-y-100">...</div>
Borders
<div class="border-w-2">...</div>
<div class="border-t-1 border-b-1">...</div>
<div class="border-l-3 border-r-3">...</div>
Outline
<div class="outline-offset-4">...</div>
Container
<div class="container">Centered content with max-width</div>

📁 Project Structure

tailwindcss-calc/
├── src/
│   └── plugin.css         # Main plugin file
├── example/               # Demo folder
│   ├── index.html        # Demo page
│   ├── index.css         # Example CSS
│   ├── package.json      # Example dependencies
│   └── vite.config.js    # Vite configuration
├── package.json          # Root package.json
├── LICENSE              # MIT License
└── README.md            # This file

🔧 How to Use in Your Project

Option 1: Install from npm (Recommended)
  1. Install the package:
npm install tailwindcss-calc
  1. Import in your CSS file:
@import "tailwindcss";
@import "tailwindcss-calc";

That's it! All utilities are now available.

Option 2: Import from node_modules
@import "tailwindcss";
@import "tailwindcss-calc/src/plugin.css";
Option 3: Copy the source

Copy the content from src/plugin.css and paste it into your main CSS file after @import "tailwindcss".

Important: Use @import for CSS files, not @plugin. The @plugin directive is only for JavaScript files in Tailwind CSS v4.

⚙️ Customization

Override --window-width in your own stylesheet, after the import — there's no need to edit src/plugin.css. Set it once for mobile and once at md:

@import "tailwindcss";
@import "tailwindcss-calc";

@layer theme {
  :root {
    --window-width: 390; /* your mobile artboard */
  }

  @variant md {
    :root {
      --window-width: 1920; /* your desktop artboard */
    }
  }
}

Match these to the artboard widths in your design file. Every utility recalculates automatically — there is nothing else to configure.

Use @variant md, not a raw media query
/* ✅ mobile-first, matches the plugin */
@variant md {
  :root { --window-width: 1440; }
}…

Description from the npm listing.

  • tailwindcss
  • tailwindcss-plugin
  • css
  • utility-classes
  • responsive
  • viewport-based
  • calc
  • clamp

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

7/30/90-day growth

tailwindcss-calc weekly downloads growth on npm: +91.7% over 7 days, -88.7% over 30 days, +188% over 90 days.tailwindcss-calcWeekly downloads growth on npm23downloads / week now7-day growth+11 weekly downloads+91.7%30-day growth-181 weekly downloads-88.7%90-day growth+15 weekly downloads+188%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
tailwindcss-calc weekly downloads growth on npm: +91.7% over 7 days, -88.7% over 30 days, +188% over 90 days.

Ranking history

tailwindcss-calc npm ranking history: currently #2962 (by weekly downloads).tailwindcss-calcnpm ranking · by weekly downloads · Last 90 days#2962current rank#1600#1800#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
tailwindcss-calc npm ranking history: currently #2962 (by weekly downloads).

Listing placement

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

Listing placement

Tailwind plugins292 listings · 15 pages · page 9, #13 (overall #173)
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-calc
Date (UTC)Weekly downloadsChange vs. previous
23+1
22+3
19+12
7+2
50
5+2
3-9
120
12+2
10-9
19-19
38-11
49-1
50—

Similar npm Tailwind plugins plugins

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