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-glow

v2.0.0-beta.1

Published

TailwindCSS glow plugin

Readme

Colored/Dynamic Shadow/Glow Plugin for TailwindCSS

NOTE: This plugin is for Tailwind 2.x and unstable; 1.x plugin is at v0.3.10. https://github.com/umstek/tailwindcss-glow/releases/tag/v0.3.10

The default shadow plugin for TailwindCSS doesn't support colored shadows, which is a trend now. This can be customized, of course, but it is still overwhelming to get colored shadows for, e.g.: 10 colors.
WARNING: This generates a lot of styles, so it is recommended that you choose only the colors that are necessary, and/or enable purging.

Installation

CAREFUL: We DON'T use semantic versioning. 0.x versions are for tailwindcss 1.x and the new versions will maintain major version number as same as the tailwind major version.

With npm

npm i tailwindcss-glow

With yarn

yarn add tailwindcss-glow

Usage

// tailwind.config.js
module.exports = {
  theme: {
    glow: {
      colors: { // Defaults to all theme colors
        // ...
      },
      styles: { // Defaults to these values
        default: baseColor =>
          `0 1px 3px 0 rgba(${baseColor}, 0.4), 0 1px 2px 0 rgba(${baseColor}, 0.24)`,
        md: baseColor =>
          `0 4px 6px -1px rgba(${baseColor}, 0.4), 0 2px 4px -1px rgba(${baseColor}, 0.24)`,
        lg: baseColor =>
          `0 10px 15px -3px rgba(${baseColor}, 0.4), 0 4px 6px -2px rgba(${baseColor}, 0.20)`,
        xl: baseColor =>
          `0 20px 25px -5px rgba(${baseColor}, 0.4), 0 10px 10px -5px rgba(${baseColor}, 0.16)`,
        "2xl": baseColor => `0 25px 50px -12px rgba(${baseColor}, 1)`,
        outline: baseColor => `0 0 0 3px rgba(${baseColor}, 0.5)`,
        none: "none"
      }
    }
    // ...
  },
  plugins: [
    // ...
    require("tailwindcss-glow")(),
    // ...
};

This plugin generates the following utilities:

.glow-blue-100 {
  /* For each color (blue-100 here), for the `default` style */
  box-shadow: 0 1px 3px 0 rgba(235, 248, 255, 0.4), 0 1px 2px 0 rgba(235, 248, 255, 0.24);
}

.glow-blue-100-md {
  /* For each color (blue-100 here), for each sizes (styles) from `md`, `lg`, `xl` and `2xl`. */
  box-shadow: 0 4px 6px -1px rgba(235, 248, 255, 0.4), 0 2px 4px -1px rgba(235, 248, 255, 0.24);
}

/* ... */

.glow-dynamic {
  position: relative;
  z-index: 1;
}

.glow-dynamic::after {
  content: "";
  position: absolute;
  background: inherit;
  z-index: -1;
  width: 99%;
  height: 98%;
  top: 2px;
  left: 0.4%;
  filter: blur(2px);
  opacity: 1;
}

.glow-dynamic-md {
  position: relative;
  z-index: 1;
}

.glow-dynamic-md::after {
  content: "";
  position: absolute;
  background: inherit;
  z-index: -1;
  width: 99%;
  height: 98%;
  top: 4px;
  left: 0.5%;
  filter: blur(3px);
  opacity: 0.7;
}

/* ...*/

/* 
 * Dynamic glow styles cannot be extended, as of now. The built-in styles are, `default`, `md`, `lg`, `xl` and `2xl`. 
 * These have been designed to be visually similar as much as possible to their box-shadow counterparts, 
 * when used with a single color background.
 */

Customization

Since the theme colors might include a lot of unnecessary colors, it is recommended to limit the color palette to your selected accent color(s). Since the configuration file is JavaScript, you can filter out some of the theme colors.

glow: (theme) => ({
  colors: {
    blue: theme("colors.blue"),
    pink: theme("colors.pink.100"),
  },
  styles: {
    // ...
  },
});

The default glow styles are the same as TailwindCSS's default shadows, but with an increase in alpha channel. You can customize them just like you can customize TailwindCSS shadows with one key difference:
In this plugin, we have to support multiple colors, so the R, G, B part of the color is changing. So, instead of an style string, in this plugin you have to use a function in the format (e.g.):

 md: baseColor => `0 4px 6px -1px rgba(${baseColor}, 0.4), 0 2px 4px -1px rgba(${baseColor}, 0.24)`,
 // ...

where the baseColor will be a comma-separated list of R, G and B values of that color, in that order, as a string. We have used string interpolation here.
e.g.: For baseColor == rgb(235, 248, 255),

0 4px 6px -1px rgba(235, 248, 255, 0.4), 0 2px 4px -1px rgba(235, 248, 255, 0.24);

will be generated. Your theme colors can be in any format, #000000 or hsl or otherwise; these will be converted. This implementation is subject to change in a future version.

Dynamic glows cannot be customized currently, as they are hand-picked to be visually similar to the default styles, and thus do not show a sane way to customize.