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

shadow-plugin

v2.1.0

Published

TailwindCSS plugin for adding nice looking shadows.

Readme

Smooth Shadow Plugin

Smooth Shadow Plugin

A simple Tailwind plugin that makes your shadows finally look good.

shadow.floriankiem.com — try every size, ring and color in the browser and copy the class.

Install

npm i shadow-plugin

Usage

Tailwind stylesheet

@import "shadow-plugin";

Element classes

<div class="smooth-shadow-md" />

The plugin supports Tailwind's shadow color utilities:

<div class="smooth-shadow-md shadow-blue-500/50" />

Shadow + ring

For elevated surfaces (dialogs, popovers, cards, menus), use smooth-shadow-ring-{size}, the same stacked shadow with a 1px hairline ring baked in as the final layer, so the edge morphs into the shadow instead of sitting next to it as a separate border. Don't add a border/ring on top; the ring is already in there.

<div class="smooth-shadow-ring-md" />

The ring and the shadow are colored independently. shadow-{color} tints the shadow, smooth-ring-{color} tints the ring, and they compose freely:

<div class="smooth-shadow-ring-md smooth-ring-black/10" />
<div class="smooth-shadow-ring-md smooth-ring-blue-500/40 shadow-blue-500" />

The ring defaults to rgba(0, 0, 0, 0.05) and flips to rgba(255, 255, 255, 0.18) in dark mode. That happens automatically under a .dark class, data-theme="dark", or — for OS-preference dark modes — whenever the page declares color-scheme: light dark.

The flip deliberately never keys off prefers-color-scheme alone: that media query reports the visitor's OS setting, not whether your site has a dark theme, so a light-only site keeps its light ring for every visitor instead of serving dark-OS users an invisible white hairline. If your dark mode is driven purely by a prefers-color-scheme media query, declare it (good practice anyway — it also fixes scrollbars and form controls) and the ring follows automatically:

:root {
  color-scheme: light dark;
}

The dark alpha is deliberately much higher than the light one. The ring is an outer layer, so it paints on the page behind the surface and takes its rendered colour from the page background rather than from the surface it outlines. In light mode that is forgiving, because a black hairline darkens away from any near-white surface. In dark mode a white hairline lightens toward a raised surface, so too low an alpha lands the ring on the surface's own colour and the edge vanishes.

If your surface is light enough to sit near the ring anyway (neutral-700 and up on a dark page), set it explicitly:

:root {
  --smooth-ring-color: rgba(255, 255, 255, 0.28);
}

Ring width

The hairline follows your project's Tailwind ring width, so a scale built on a thinner ring gets a matching one here — no configuration needed:

@theme {
  --default-ring-width: 0.5px;
}

It defaults to 1px, matching Tailwind's own default. To set the ring width independently of --default-ring-width, or to change it for one subtree, set --smooth-ring-width at any scope:

:root {
  --smooth-ring-width: 2px;
}

Per element, Tailwind's arbitrary-property syntax works too: <div class="smooth-shadow-ring-md [--smooth-ring-width:2px]" />.

Overriding a smooth shadow

The utilities are plain Tailwind utilities with no !important, so they follow the normal cascade — a later utility, an inline style, or a JS animation on box-shadow all override them the way you'd expect.

If you need one to win against CSS that would otherwise beat it (a component library's own box-shadow, which usually ships unlayered), use Tailwind's important modifier rather than reaching for a global setting:

<div class="smooth-shadow-md!" />

It works on every utility here, including variants and the ring: smooth-shadow-ring-lg!, hover:smooth-shadow-lg!, smooth-ring-blue-500/40!.

Optional: Replace all your default shadows

Import the unprefixed entrypoint and Tailwind's own shadow-xsshadow-2xl render the smooth stacks — no new class names to learn:

@import "tailwindcss";
@import "shadow-plugin/unprefixed";

Because it writes literal values into Tailwind's --shadow-* theme tokens, the full native feature set keeps working: the opacity modifier (shadow-md/40), shadow-{color}, and variants. The smooth-shadow-ring-* utilities have no native equivalent, so they come along under their own names. An existing scale migrates by deleting the smooth- prefix.

Don't use @theme { --shadow-md: var(--smooth-shadow-md); } for this. It renders, but Tailwind can't see inside the var to reach the individual layers, so shadow-md/40 and shadow-{color} silently stop working.

Available classes

| Class | Size | | -------------------------------------------------- | ---------------------------------------------------------------------- | | smooth-shadow-xs | Extra small | | smooth-shadow-sm | Small | | smooth-shadow / smooth-shadow-md | Medium (default) | | smooth-shadow-lg | Large | | smooth-shadow-xl | Extra large | | smooth-shadow-2xl | 2x large | | smooth-shadow-none | None | | smooth-shadow-ring-xssmooth-shadow-ring-2xl | Shadow + 1px hairline ring (smooth-shadow-ring = medium) | | smooth-ring-{color} | Ring color override, supports opacity (e.g. smooth-ring-blue-500/40) |

The ring reads two custom properties you can set at any scope: --smooth-ring-color and --smooth-ring-width.

Agent skills

To stop AI tools from pairing a border with a shadow (the double edge) and reach for smooth-shadow-ring instead:

License

MIT

Created by Nils Eller, Eduard Wieandt, and Florian Kiem, in collaboration with Rogo.