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

@andreibratila/tailwind-utopia

v1.2.4

Published

A Tailwindcss v4 library for fluid typography and spacing with Utopia

Readme

Tailwindcss V4 Utopia Library

A Tailwind CSS library that implements Utopia's fluid responsive design methodology, providing smooth, responsive typography and spacing without breakpoints.

Features

  • 🎯 Fluid Typography: Text sizes that scale smoothly between viewport sizes
  • 📏 Fluid Spacing: Responsive spacing utilities that adapt to screen size
  • 🎨 Tailwind Integration: Seamless integration with Tailwind CSS
  • Performance: Zero runtime overhead, pure CSS solution
  • 🛠️ Customizable: Flexible configuration for your design needs

Installation

Project installation

npm install --save-dev @andreibratila/tailwind-utopia

or

Global installation

npm install -g @andreibratila/tailwind-utopia

Quick Start

  1. Use the CLI to generate a config file:
npx tailwind-utopia config

I recomend use prefix in configFile example: "fs-"

  1. Create the css
npx tailwind-utopia generate

with flags if you want to read de config file

npx tailwind-utopia generate configPath=./src/configs
  1. Import the css file in your tailwind css file:
example: global.css

@import "tailwindcss";
@import "./tailwind-utopia.css";
... other css files / configurations
  1. Start using fluid utilities in your HTML:
<h1 class="text-fs-2xl mb-fs-l">
  Fluid Typography
</h1>

Configuration

The library uses a configuration file (tailwind-utopia.config.json) to define your fluid typography and spacing scales. You can generate a default configuration using:

bash npx tailwind-utopia config

Typography Scale

The typography scale is defined by:

  • Base size (min and max)
  • Scale ratio (min and max)
  • Custom steps

Example configuration:

json
{
  "prefix": "",
  "baseKey": "base",
  "utopia": {
    "minWidth": 320,
    "minSize": 21,
    "minScale": 1.2,
    "maxWidth": 1140,
    "maxSize": 24,
    "maxScale": 1.25,
    "fontSize": {
      "xs": "inherit",
      "sm": "inherit",
      "base": 1.4,
      "lg": 1.33,
      "xl": 1.2,
      "2xl": 1.11,
      "3xl": 1,
      "4xl": 1
    },
    "spacing": {
      "3xs": 0.25,
      "2xs": 0.5,
      "xs": 0.75,
      "sm": 1,
      "md": 1.5,
      "lg": 2,
      "xl": 3,
      "2xl": 4,
      "3xl": 6
    }
  }
}

Spacing Scale

The spacing scale works similarly to typography, providing fluid values for margins, padding, and gaps:

Usage

!!! IMPORTANT!!! I recomend create prefix always example: "fs-"

Typography

<h1 class="text-{prefix(optional}sm">Large Fluid Heading</h1>
<p class="text-fs-sm">Body text that scales smoothly</p>
<small class="text-sm">Smaller text</small>

Spacing

<div class="mb-{prefix(optional}xs">
  <h2 class="mb-fs-xs">Title</h2>
  <p class="mb-xs">Content</p>
</div>

CLI Commands

The library includes a CLI with the following commands:

Generate configuration file

npx tailwind-utopia config

Generate CSS file

npx tailwind-utopia generate

Display help

npx tailwind-utopia --help

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT License - see LICENSE for details.

Acknowledgements

Inspired by Utopia, a methodology for fluid responsive design and @domchristie/tailwind-utopia plugin, domchristie/tailwind-utopia.

Utopia: James Gilyead & Trys Mudford
Original Tailwind Utopia plugin: Chris Pymm & CWS Digital
Plugin I based my work on: Dom Christie

Credits

This project was created by Andrei Florian Brătila, andreiflorianbratila.com.

Special thanks to all contributors who helped improve this library. If you’d like to contribute, check out our CONTRIBUTING.md.

By contributing to this project, you agree that your code will be licensed under the MIT License.

Consider supporting this project by starring the repository or sponsoring via GitHub Sponsors.