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

@janis.me/react-themed

v0.2.2

Published

SCSS-native themes made simple

Downloads

25

Readme

@janis.me/themed is the all-in-one solution for adding themes to your website. Easy, feature-rich and safe. First-class javascript/typescript support! (and react via @janis.me/react-themed).

[!WARNING]
This is still in development. Expect things to break and change before it hits 1.0.0

Visit our Documentation


Features:

  • 🔒 Type-checking themes for validity, checking all values exist, with proper error messages!
  • 🌈 Auto-generated Themes! Never struggle with color saturation again.
  • 🖌 Multi-theme: You can either use classic dark/light themes, or define as many as you want!
  • 🚀 Everything you need like controlling themes via js/ts - built in.
  • 🔌 Built-in plugins like auto-generated color variants, blending colors and more.
  • 🎭 Customizable: Adjust nearly every aspect of how you use themes.
  • 🌐 Produces nice SCSS AND CSS variables, so you can use all SCSS features with theming.
  • First class React support with @janis.me/react-themed.

Usage:

It's as easy as:

@use '@janis.me/themed' as *;

// Define themes in a map, or generate it with themed! (See docs)
$themes: (
  'dark': (
    'text': #212529,
    'background': #fafafa,
    // ...
  ),
  'light': (
    'text': #fafafa,
    'background': #212529,
    // ...
  ),
);

// Configure the themes. They will be checked for validity, uniformity etc.
@include configure($theme-map);
// Add the CSS variables wherever you need them with `apply`
@include apply();

// Use the themed function to get type-checked theming!
body {
  color: themed('text');
  background-color: themed('background');
}

And 🎉 tada: When you use a wrong variable, you instantly know it!

[sass] "'grey' is not defined in your themes."
    ╷
22  │  background-color: themed("grey");
    │                     ^^^^^^^^^^^^^^^^^
    ╵
  src/styles/main.scss 22:21  root stylesheet

Installation:

npm install @janis.me/themed
# or
pnpm add @janis.me/themed

React

For react, install @janis.me/react-themed and place a at the app level of your app. You can then use the useTheme hook to retrieve/update it. All utility methods are also exported from @janis.me/react-themed/js.


Questions

Q: Why not just use CSS variables?

  1. Using SCSS builtins like color.adjust and color.change will not work with CSS variables. If you need transparency, or want to generate shades of a color with SCSS, it's tough
  2. Browser support. Not all browsers support @property yet, or they might not support the colors you define (display-p3/wide-gammut). Themed is aware of all these issues and solves them for you!
  3. Error-checking. If you misspell or accidentally override a CSS variable, you're screwed. With themed, that'll never happen!

Q: Can I use this with tailwind?

A: Yes! We even want to add native support for it via a plugin. You can just define CSS variables as you normally would and then pass them to tailwind.

Q: What dependencies does this have?

A: None, except for SCSS. We do suggest to use tools like Vite though, just to make your life a bit easier.

Q: And what about build tools, bundling and CSS output. Anything to be aware of?

A: TL:DR: Just call themed.configure() in a global.scss file and @use that. Then you're good. Long answer: Yes, good that you ask. We use global SCSS variables to keep track of the registered themes. Those SCSS variables are lexically scoped to modules, so you will only be able to use the "themed" function in the same scope. Meaning, if you want to use themed functions in multiple files, make sure that they all @use a file that defines the themes. See the vite-vanilla-extended or vite-react examples for this, they define a global.scss file. This is, of course, only needed on compile time. The CSS output will always be the same.

Developing

We use pnpm and pnpm workspaces to maintain themed. You must have PNPM installed. Clone the repo, install all packages with pnpm install and build them, for example using pnpm run build:watch in the root folder. You can also run the examples with, for example pnpm run example:vanilla. Any code change you now make should instantly be reflected (after a quick rebuild). Initially, you might see errors in the console, because the react and the vanilla package try to build in parallel.