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

vite-ai-css-plugin

v0.1.1

Published

Transform natural language descriptions into Tailwind CSS classes with AI magic

Readme

🎨 Vite AI CSS Plugin

Transform natural language descriptions into Tailwind CSS classes with AI magic ✨

A Vite plugin that automatically generates Tailwind CSS classes using AI models like Ollama and Gemini. Simply describe what you want in Polish or English, and watch as your styles come to life!

✨ Features

  • 🧠 AI-Powered: Leverages Ollama or Gemini to generate CSS classes
  • 🌍 Multilingual: Works with Polish and English descriptions
  • Fast: Integrates seamlessly with Vite's dev server
  • 🎯 Smart: Generates modern, responsive designs automatically
  • 🔄 Flexible: Switch between different AI backends

🚀 Installation

# Clone or copy the plugin to your project
# Add to your vite.config.js/ts

📋 Usage

1. Configure the plugin in vite.config.ts:

import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import tailwindcss from '@tailwindcss/vite'
import AiCssPlugin from 'vite-ai-css-plugin'

export default defineConfig({
  plugins: [
    AiCssPlugin({
      backend: {
        ollama: {
          url: "http://localhost:11434/api/generate",
          model: "qwen3:1.7b",
        },
        gemini: {
          apikey: "YOUR_GEMINI_API_KEY",
          model: "gemini-1.5-flash",
        },
      },
      active: "ollama", // or "gemini"
    }),
    react(),
    tailwindcss(),
  ],
})

2. Use in your React components:

function App() {
  return (
    <div className={aiCss("główny kontener, pełna wysokość ekranu, gradient niebieski do fioletowego")}>
      <h1 className={aiCss("duży tytuł, biały tekst, cień")}>
        Hello AI CSS! 
      </h1>
      <button className={aiCss("przycisk, niebieski, hover efekt, zaokrąglone rogi")}>
        Click me
      </button>
    </div>
  )
}

3. Watch the magic happen! 🪄

The plugin transforms your descriptions into proper Tailwind classes:

  • "główny kontener, pełna wysokość""min-h-screen flex flex-col"
  • "przycisk, niebieski, hover efekt""bg-blue-500 hover:bg-blue-600 px-4 py-2 rounded"

⚙️ Configuration

Backends

Ollama (Local)

ollama: {
  url: "http://localhost:11434/api/generate",
  model: "qwen3:1.7b" // or any other model
}

Gemini (Cloud)

gemini: {
  apikey: "your-api-key-here",
  model: "gemini-1.5-flash"
}

💡 Examples

// Polish descriptions
<div className={aiCss("karta produktu, cień, białe tło, zaokrąglone")}>
<img className={aiCss("obrazek, pełna szerokość, proporcje zachowane")} />
<h3 className={aiCss("tytuł, pogrubiony, ciemny tekst")}>Product</h3>

// English descriptions  
<nav className={aiCss("navigation bar, sticky top, dark background")}>
<button className={aiCss("menu button, hamburger style, mobile responsive")}>

🛠️ Requirements

  • Node.js 16+
  • Vite
  • Tailwind CSS
  • One of:
    • Ollama (local AI server)
    • Gemini API key

⚡ Development

The plugin processes .jsx and .tsx files during build time, replacing aiCss() calls with generated class strings.

🤝 Contributing

This started as a fun experiment - feel free to improve it! PRs welcome.

📝 License

MIT - Have fun with it! 🎉


Made with ❤️ and a bit of AI magic