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

tailwind-elements-ui

v1.0.1

Published

Interactive UI components for Tailwind CSS — modals, dropdowns, carousels, tooltips, and more.

Readme

tailwind-elements-ui

Interactive UI components built for Tailwind CSS. Drop in modals, dropdowns, carousels, tooltips, and other behavior-driven elements without leaving your Tailwind workflow.

Version: 1.0.1


Features

  • Tailwind CSS plugin with extended theme tokens (colors, shadows, animations)
  • Auto-initializing JavaScript components via data-twe-* attributes
  • ESM and UMD bundles with TypeScript declarations
  • Dark mode support (class strategy)
  • Works with plain HTML, Vite, Webpack, Next.js, and other bundlers

Requirements

Installation

npm install tailwind-elements-ui

Quick start

1. Configure Tailwind

Add the plugin and scan component class names from the package:

// tailwind.config.js
module.exports = {
  content: [
    "./src/**/*.{html,js,jsx,ts,tsx}",
    "./node_modules/tailwind-elements-ui/js/**/*.js",
  ],
  plugins: [require("tailwind-elements-ui/plugin")],
  darkMode: "class",
};

Use require("tailwind-elements-ui/plugin.cjs") if your config does not resolve the ./plugin export.

2. Import styles

Option A — compiled CSS (simplest)

import "tailwind-elements-ui/css";

Option B — SCSS source (custom Tailwind pipeline)

@import "tailwind-elements-ui/src/css/tailwind.scss";

3. Load JavaScript

Bundler (recommended)

import "tailwind-elements-ui";

Components on the page are initialized automatically when the module loads.

Classic HTML

<script src="./node_modules/tailwind-elements-ui/js/tailwind-elements-ui.umd.min.js"></script>

The UMD build attaches to window.tailwindElementsUi.

CDN usage

<head>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/css/tailwind-elements-ui.min.css" />
  <script src="https://cdn.tailwindcss.com"></script>
  <script>
    tailwind.config = { darkMode: "class" };
  </script>
</head>
<body>
  <!-- your markup -->
  <script src="https://cdn.jsdelivr.net/npm/[email protected]/js/tailwind-elements-ui.umd.min.js"></script>
</body>

Components (v1.0.1)

| Component | Purpose | | ----------- | -------------------------------------------- | | Button | Toggle active state on buttons | | Collapse | Expand/collapse panels | | Dropdown | Menus with Popper positioning | | Modal | Dialog overlays with focus trap | | Offcanvas | Slide-in panels | | Carousel | Slideshow with touch support | | Tooltip | Hover/focus tooltips | | Popover | Click-triggered popovers | | Tab | Tabbed navigation | | ScrollSpy | Highlight nav items while scrolling | | Input | Enhanced form inputs | | Ripple | Material-style ripple effect |

Mark up elements with the documented data-twe-* attributes; the runtime wires up behavior on load.

Programmatic API

Import named exports when you need manual control:

import { Modal, Dropdown, init } from "tailwind-elements-ui";

const modal = Modal.getOrCreateInstance(document.getElementById("my-modal"));
modal.show();

init({ Modal, Dropdown }, { checkOtherImports: true });

init(components?, options?)

| Option | Type | Default | Description | | ------------------- | --------- | ------- | ------------------------------------------------ | | allowReinits | boolean | false | Re-initialize components that were already set up | | checkOtherImports | boolean | false | Warn when DOM nodes need a missing component |

Package exports

| Import path | Description | | ------------------------------ | ------------------------------ | | tailwind-elements-ui | ESM / UMD JavaScript bundle | | tailwind-elements-ui/css | Minified stylesheet | | tailwind-elements-ui/plugin | Tailwind CSS plugin | | tailwind-elements-ui/plugin.cjs | Tailwind CSS plugin (CJS) |

Project structure

tailwind-elements-ui/
├── css/                  # Compiled stylesheet
├── js/                   # ESM + UMD bundles
├── types/                # TypeScript declarations
├── plugin.cjs            # Tailwind plugin
└── src/css/              # SCSS entry for custom builds

License

MIT — see LICENSE.