npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@theunwindfront/tailwindcss-fluid-scale

v1.0.2

Published

Tailwind CSS v4 plugin for automatic, fluid typography and dynamic spacing scales using native CSS clamp().

Readme

@theunwindfront/tailwindcss-fluid-scale

Latest Version on Packagist Total Downloads NPM Version NPM Downloads License

A high-performance, design-system integrated Tailwind CSS v4 plugin to compile mathematically fluid typography and spacing scales dynamically using native CSS clamp().


The Problem

Managing perfectly fluid layouts across a wide range of devices usually requires declaring repetitive responsive breakpoints (such as text-sm md:text-base lg:text-lg xl:text-3xl). This creates verbose stylesheets, leads to repetitive code, and causes sudden, jarring layout jumps when screen sizes cross responsive boundaries.

The Solution

This plugin calculates dynamic mathematical slopes on the fly, locking typography and spacing between a defined minimum viewport boundary (default 320px) and a maximum viewport boundary (default 1536px / 2xl).

Instead of jumping abruptly between breakpoints, sizes scale smoothly pixel-by-pixel:

<!-- Typography locks smoothly between font-size 'sm' and '3xl' -->
<h1 class="fluid-text-sm-3xl font-black">Dynamic Title</h1>

<!-- Padding-x scales linearly from index 4 (16px) to 16 (64px) -->
<div class="fluid-px-4-16 border rounded-xl">
    Fluid Container Box
</div>

The plugin programmatically reads boundaries directly from the active @theme context (e.g. screens.sm and screens.2xl), ensuring fluid computations stay perfectly synchronized with your design system.


Installation

Install the package via Composer (for Laravel integration) and NPM (for the Tailwind CSS plugin):

composer require theunwindfront/tailwindcss-fluid-scale
npm install @theunwindfront/tailwindcss-fluid-scale

Add the plugin to your main stylesheet (Tailwind CSS v4):

@import "tailwindcss";
@plugin "@theunwindfront/tailwindcss-fluid-scale";

For Tailwind v3, import it in tailwind.config.js:

module.exports = {
  plugins: [
    require('@theunwindfront/tailwindcss-fluid-scale'),
  ],
}

Usage Guide

1. Fluid Typography

Scale font sizes between standard Tailwind theme keys. Typographic scale declarations also preserve pre-configured line heights automatically:

<h1 class="fluid-text-sm-3xl">Fluid Heading</h1>
<p class="fluid-text-xs-base text-slate-500">Fluid paragraph body</p>

2. Fluid Spacing (Padding, Margin, Gaps, Width, Height)

Scale distances linearly across viewports:

  • Padding: fluid-p-{min}-{max}, fluid-px-{min}-{max}, fluid-py-{min}-{max}, fluid-pt-*-*, etc.
  • Margin: fluid-m-{min}-{max}, fluid-mx-{min}-{max}, fluid-my-{min}-{max}, fluid-mt-*-*, etc.
  • Gaps: fluid-gap-{min}-{max}, fluid-gap-x-*-*, fluid-gap-y-*-*
  • Dimensions: fluid-w-{min}-{max}, fluid-h-{min}-{max}
<div class="fluid-py-3-8 fluid-px-4-16 fluid-gap-2-8 grid grid-cols-3">
    <div>A</div>
    <div>B</div>
    <div>C</div>
</div>

3. Custom Arbitrary Calculations

If you need to bypass standard design tokens, you can input arbitrary pixel or rem sizes using bracket syntax. The compiler will calculate the exact slope equation automatically on the fly:

<!-- Scales font-size from 12px to 60px -->
<span class="fluid-text-[12px-60px]">Huge Scaling Headline</span>

<!-- Scales padding-y from 1.5rem to 80px -->
<section class="fluid-py-[1.5rem-80px]">...</section>

Configuration Options

You can configure custom default viewport ranges directly within the @plugin initialization block:

@plugin "@theunwindfront/tailwindcss-fluid-scale" {
  minWidth: "375px";
  maxWidth: "1440px";
}

👥 Credits

🤝 Support

For questions or issues, contact [email protected]

📄 License

The MIT License (MIT). Please see License File for more information.