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 🙏

© 2025 – Pkg Stats / Ryan Hefner

tailwindcss-better-gradient

v0.1.3

Published

A Tailwind CSS plugin for creating beautiful gradient backgrounds with directional control

Readme

Tailwind CSS Better Gradient Plugin

A powerful Tailwind CSS plugin that creates beautiful gradient backgrounds with precise control over direction and color. Uses OKLCH color space for smooth, natural-looking gradients.

Features

  • 🎨 Works with all Tailwind colors
  • 📐 8 directional options (cardinal + diagonal)
  • 🌈 Smooth OKLCH-based gradients
  • 🎯 Natural easing curve (not linear like Tailwind defaults)
  • 🔧 Fully composable utilities
  • ⚡ Zero dependencies (except Tailwind CSS)
  • 🎚️ Configurable steps (2-24) for perfect smoothness control

Installation

npm install tailwindcss-better-gradient

Configuration

Tailwind CSS v4 (CSS-based)

Import the plugin CSS file in your main CSS file:

@import 'tailwindcss';
@import 'tailwindcss-better-gradient';

That's it! No JavaScript configuration needed.

Tailwind CSS v3 (JavaScript plugin)

For Tailwind v3, you can still use the JavaScript plugin:

module.exports = {
  theme: {
    extend: {
      betterGradient: {
        steps: 6, // Number of gradient stops (default: 6)
      },
    },
  },
  plugins: [require('tailwindcss-better-gradient')],
};

Usage

<!-- Basic: Fade from blue to transparent, top to bottom -->
<div class="fade-blue-500 fade-b">Content here</div>

<!-- With custom steps: Ultra smooth 12-step gradient -->
<div class="fade-blue-500 fade-b fade-12">Content here</div>

<!-- Or a util for shadcn users that use the --background-color variable -->
<div class="fade">Content here</div>
<!-- or -->
<div class="fade fade-b">Content here</div>

Directions

  • fade-t - Top (0deg)
  • fade-b - Bottom (180deg)
  • fade-l - Left (270deg)
  • fade-r - Right (90deg)
  • fade-tr - Top Right (45deg)
  • fade-tl - Top Left (315deg)
  • fade-br - Bottom Right (135deg)
  • fade-bl - Bottom Left (225deg)

Credits

This plugin was inspired by Smooth Gradient Overlays by Shu Ding. The concept of using easing curves for smooth gradient transitions comes from their excellent work.

License

MIT