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

@theme-kit/nuxt

v1.3.0

Published

Nuxt module for Theme Kit: SSR, cookies, and zero-flash theming.

Readme

@theme-kit/nuxt

Nuxt 3 module with SSR-first theming, zero-flash bootstrap, cookie + localStorage sync, config-driven transitions and scrollbar, and auto-imported composables/components.

Reference snippet

// nuxt.config.ts
import { themes } from "./themes";

export default defineNuxtConfig({
  modules: ["@theme-kit/nuxt"],
  themeKit: {
    themes,
    defaultTheme: "mint-light",
    initialMode: "system",
    initialFamily: "mint",
    transition: { enabled: true, duration: 360, easing: "cubic-bezier(0.4, 0, 0.2, 1)" },
    scrollbar: true,
  },
});
<script setup>
// useTheme, useThemeRuntime, useThemeHistory, ThemeScope, ThemeScrollbar …
// are auto-imported by the module — no manual imports needed.
const { theme, mode, setMode, toggleTheme } = useTheme();
</script>

<template>
  <div>
    <span>{{ theme.name }} | {{ mode }}</span>
    <button @click="toggleTheme">Toggle</button>
    <button @click="setMode('light')">Light</button>
    <button @click="setMode('dark')">Dark</button>
    <button @click="setMode('system')">System</button>

    <ThemeScope theme="forest-light">
      <p>Scoped to forest-light</p>
    </ThemeScope>

    <ThemeScrollbar auto-hide />
  </div>
</template>

Server

The module's runtime plugin resolves the initial theme on the server from the theme-name, theme-mode, theme-family and theme-fingerprint cookies, rejects stale selections via a config fingerprint, and renders a themed <html data-theme data-theme-mode data-theme-family> with inline CSS variables, a blocking bootstrap <script> in <head>, and a @media (prefers-color-scheme: dark) fallback when the persisted mode is system. The browser paints already themed — no flash of the incorrect theme.

Client

After hydration, the plugin installs one app-wide runtime (provided to useTheme() and every auto-imported composable, plus nuxtApp.$themeKit / $themeKitRuntime). Selection changes are mirrored back to cookies via createNuxtThemePersistence() so the server renders the same theme on the next request, and localStorage + storage events keep tabs in sync.

Config

configKey: "themeKit" accepts:

  • themes, defaultTheme, initialMode, initialFamily
  • transitionfalse, or { enabled, duration, easing } for config-driven CSS transitions on theme changes
  • scrollbartrue, or overlay options (thickness, radius, colors, auto-hide, …) for the theme-aware custom scrollbar
  • storageKey — localStorage key (default theme-selection)

Module

  • Nuxt 3 module (configKey: "themeKit") with themes, defaultTheme, initialMode, initialFamily, transition, scrollbar and storageKey options.
  • Auto-imports composables, registers ThemeProvider, ThemeScope and ThemeScrollbar, and installs the runtime plugin.
  • Re-exports the Vue integration plus the full @theme-kit/core surface, and the SSR helpers (resolveThemeFromCookies, computeFingerprint, parseCookieHeader, themeKitCookieNames, createNuxtThemeBootstrapScript).

Documentation

Full API reference and guides: Theme Kit docs. All packages: npm.