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 🙏

© 2025 – Pkg Stats / Ryan Hefner

grapesjs-tailwindcss-plugin

v0.1.10

Published

A powerful GrapesJS plugin that integrates Tailwind CSS 4 for modern styling and rapid development

Readme

GrapesJS TailwindCSS Plugin

The GrapesJS TailwindCSS Plugin seamlessly integrates Tailwind CSS 4 with GrapesJS, enabling you to leverage a modern CSS framework directly within your page builder. With on-the-fly CSS building, this plugin provides up-to-date styles and exports the compiled CSS with your project.

Key Features:

  • Tailwind CSS 4 Integration: Utilize the latest version of Tailwind CSS.
  • Dynamic CSS Build: Automatically compiles Tailwind CSS based on your project's classes.
  • Export Ready: The compiled CSS is appended to your export, ensuring consistency.
  • Multi Page Support: The plugin makes use of the PageManager

DEMO

Installation

CDN

<script src="https://unpkg.com/grapesjs-tailwindcss-plugin"></script>

NPM

npm i grapesjs-tailwindcss-plugin

GIT

git clone https://github.com/fasenderos/grapesjs-tailwindcss-plugin.git

Usage

Directly in the Browser

<link
  href="https://unpkg.com/grapesjs/dist/css/grapes.min.css"
  rel="stylesheet"
/>
<script src="https://unpkg.com/grapesjs"></script>
<script src="path/to/grapesjs-tailwindcss-plugin.min.js"></script>

<div id="gjs"></div>

<script type="text/javascript">
  var editor = grapesjs.init({
    container: "#gjs",
    // ... other configurations
    plugins: ["grapesjs-tailwindcss-plugin"],
    pluginsOpts: {
      "grapesjs-tailwindcss-plugin": {
        // Options like autobuild, toolbarPanel, notificationCallback, buildButton, etc.
      },
    },
  });
</script>

Modern Javascript

import grapesjs from "grapesjs";
import plugin from "grapesjs-tailwindcss-plugin";
import "grapesjs/dist/css/grapes.min.css";

const editor = grapesjs.init({
  container: "#gjs",
  // ... other configurations
  plugins: [plugin],
  pluginsOpts: {
    [plugin]: {
      // Options like autobuild, toolbarPanel, notificationCallback, buildButton, etc.
    },
  },
  // Alternatively:
  // plugins: [
  //   editor => plugin(editor, { /* options */ }),
  // ],
});

Summary

  • Plugin name: grapesjs-tailwindcss-plugin
  • Commands: build-tailwind
  • Button: build-tailwind-button

Options

| Option | Description | Type | Default | | --- | --- | --- | --- | | prefix | Prefix to use for Tailwind CSS classes. Helps differentiate Tailwind classes from others. | string or null |null | | autobuild | If true, the plugin automatically rebuilds Tailwind CSS on each update. Set to false for manual builds. | boolean | true | | autocomplete | Controls the behavior of the autocomplete feature that provides Tailwind class name suggestions. If set to false, autocomplete is disabled. If set to true (default), autocomplete is enabled and will use the default selector #gjs-clm-new. If set to a string, that string will be used as a custom selector for the autocomplete. | boolean or string | true | | customCss | The URL of a CSS file or a raw CSS string that will be appended immediately after the @import 'tailwindcss'; statement. This allows you to extend Tailwind's styles dynamically. See the Tailwind docs for more details. | string | "" | | buildButton | Option to add a manual build button to the toolbar for triggering the CSS build process. | boolean | false| | toolbarPanel | Specify the panel where the build button should be added (e.g., options). | string | options | | notificationCallback | A custom callback function to handle notifications when Tailwind CSS is compiled. | function | () => void |

Development

Clone the repository

$ git clone https://github.com/fasenderos/grapesjs-tailwindcss-plugin.git
$ cd grapesjs-tailwindcss-plugin

Install dependencies

$ npm i

Start the dev server

$ npm start

Build the source

$ npm run build

License

Copyright Andrea Fassina, Licensed under MIT.