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

themewind

v1.5.0

Published

Tailwind theming with optional shade generation

Downloads

3

Readme

themewind

Easily create tailwind themes in your projects along with optional automatic shade generation of theme colors.

Example Usage

Add the package using your preferred package manager e.g.

yarn add themewind@latest

In your tailwind.config reference the plugin depending on your setup:

import themewind from 'themewind';
const themewind = require('themewind');

Create themes by instantiating the plugin as shown below - hex values must be used:

plugins: [
  themewind({
    defaultTheme: 'light', // This is required and must match a key in the themes object
    shades: ['primary', 'secondary', 'tertiary'], // This can be ommitted if no shades are required
    themes: {
      light: {
        colors: {
          primary: '#1fb6ff',
          secondary: '#dd00ff',
          tertiary: '#500098',
          neutral: '#888',
          surface: '#f6f2eb',
          content: '#272b2e'
        },
      },
      dark: {
        colors: {
          primary: '#1fb6ff',
          secondary: '#dd00ff',
          tertiary: '#500098',
          neutral: '#888',
          surface: '#272b2e',
          content: '#f6f2eb'
        },
      },
    },
  }),
]

Things to Note

The defaultTheme config has the css scope of :root,[data-theme=defaultTheme]. Every other theme has a css scope of [data-theme=theme] allowing you to switch themes easily by setting the data-theme attribute anywhere within your application's html.

For theme colors, shades can be generated automatically by including its key in the shades array.

All Tailwind utility classes will be available for each theme color, with or without automatic shading - this includes opacity modifiers i.e. bg-primary/80 or bg-primary-500/80 if shades are generated.

Each theme color will also be available as a standalone css variable. For example, the config above will generate the css variables as below:

Due to supporting the awesome tailwind opacity modifiers you will notice they are just the RGB representation. In order to use these variables in your css you can do so by wrapping them in the css rgb function.

div {
  background-color: rgb(var(--color-primary));
}

Theme Variables In Javascript

There is also an easy way to get the theme variables into your javascript/typescript files.

You can import theme helpers file into your file, there currently only exists two helper functions:

import {themewindRGBA, themewindRGB} from 'themewind/helpers';

These functions will return strings in rgb ir rgba format for use.

Example usage:

themewindRGBA('--color-content') // 'rgba(39,43,46,1)'
themewindRGBA('--color-content', .1) // 'rgba(39,43,46,.1)'
themewindRGB('--color-content') // 'rgba(39,43,46)'

These strings can then be applied to HTML element css styles dynamically.

Things to note about javascript helpers

The values are determined at runtime, if theme switching the values will not change dynamically and refer to the old theme. (This is planned for a later release)

Theme Switching

If you want your application to be able to switch themes at the click of the button, all that is required is to add a click handler that sets the data-theme attribute as required on the html tag.