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

@sylphx/silk-nuxt

v1.0.2

Published

Nuxt 3 module for Silk - Zero-codegen CSS-in-TypeScript

Readme

@sylphx/silk-nuxt

Nuxt 3 module for Silk - Zero-codegen, zero-runtime CSS-in-TypeScript.

Features

  • Zero-codegen: No manual generate commands
  • Zero-runtime: CSS generated at build time
  • Auto-import: Automatic CSS injection
  • HMR: Hot Module Replacement support
  • Type-safe: Full TypeScript support
  • Framework integration: Works with Nuxt's Vite pipeline

Installation

npm install @sylphx/silk @sylphx/silk-nuxt

Usage

1. Add module to nuxt.config.ts

// nuxt.config.ts
export default defineNuxtConfig({
  modules: ['@sylphx/silk-nuxt']
})

2. Use in your components

<!-- pages/index.vue -->
<script setup lang="ts">
import { createStyleSystem } from '@sylphx/silk'

const { css } = createStyleSystem({})

const styles = {
  container: css({
    display: 'flex',
    flexDirection: 'column',
    alignItems: 'center',
    padding: '2rem',
    backgroundColor: '#f5f5f5'
  } as any),
  title: css({
    fontSize: '2.5rem',
    fontWeight: 'bold',
    color: '#00DC82'
  } as any)
}
</script>

<template>
  <div :class="styles.container.className">
    <h1 :class="styles.title.className">
      Nuxt + Silk ✅
    </h1>
  </div>
</template>

That's it! No need to manually import silk.css - the module handles it automatically.

Configuration

// nuxt.config.ts
export default defineNuxtConfig({
  modules: ['@sylphx/silk-nuxt'],

  silk: {
    // Source directory to scan for css() calls
    // Default: Nuxt's srcDir
    srcDir: './app',

    // Virtual module ID
    // Default: 'silk.css'
    virtualModuleId: 'silk.css',

    // Enable debug logging
    // Default: false
    debug: true,

    // Enable CSS minification
    // Default: true in production, false in dev
    minify: true,

    // Auto-import silk.css globally
    // Default: true
    autoImport: true
  }
})

Manual Import (if autoImport: false)

<!-- app.vue -->
<script setup>
import 'silk.css'
</script>

<template>
  <NuxtPage />
</template>

How it works

  1. The module wraps @sylphx/silk-vite-plugin
  2. Scans your source files for css() calls at build time
  3. Generates optimized CSS with lightningcss-wasm
  4. Creates a virtual module that Nuxt's Vite pipeline processes
  5. Auto-imports the CSS (if autoImport: true)
  6. CSS flows through Nuxt's PostCSS, minification, and bundling

Benefits over manual Vite plugin

With @sylphx/silk-nuxt:

export default defineNuxtConfig({
  modules: ['@sylphx/silk-nuxt']
})

Without (manual Vite plugin):

import silk from '@sylphx/silk-vite-plugin'

export default defineNuxtConfig({
  vite: {
    plugins: [silk()]
  }
})

The Nuxt module provides:

  • ✅ Simpler configuration
  • ✅ Auto-import support
  • ✅ Nuxt-specific optimizations
  • ✅ Better integration with Nuxt's build system

License

MIT © SylphX Ltd