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

tailwindcss-plugin-overflow-tw4

v1.0.1

Published

Tailwind CSS v4 plugin for overflow overlay utilities

Downloads

4

Readme

Tailwind CSS v4 Overflow Overlay Plugin

A Tailwind CSS v4 plugin that adds overflow overlay utilities.

Installation

npm install tailwindcss-plugin-overflow-tw4
# or
pnpm add tailwindcss-plugin-overflow-tw4
# or
yarn add tailwindcss-plugin-overflow-tw4

Available Utilities

This plugin provides the following utilities:

Overflow Overlay Utilities

  • .overflow-overlay - Sets overflow: overlay with fallback support
  • .overflow-x-overlay - Sets overflow-x: overlay with fallback support
  • .overflow-y-overlay - Sets overflow-y: overlay with fallback support

Smallscroll Utility

  • .smallscroll - Adds thin, styled scrollbars for both Firefox and Chrome/WebKit browsers
    • Customizable via CSS variables:
      • --sb-width: Scrollbar width (default: 8px)
      • --sb-radius: Scrollbar thumb border radius (default: 4px)
      • --sb-color: Scrollbar color (default: #666b7a)

Resizer Utility

  • .resizer - Adds a custom resize handle with a visual grip pattern

Example

<!-- Overflow overlay -->
<div class="overflow-overlay h-64 w-64">
  <!-- Content with overlay scrollbars -->
</div>

<!-- Vertical overlay scrollbar -->
<div class="overflow-y-overlay h-64">
  <!-- Content with vertical overlay scrollbar -->
</div>

<!-- Custom thin scrollbars -->
<div class="smallscroll overflow-auto h-64">
  <!-- Content with thin, styled scrollbars -->
</div>

<!-- Custom scrollbar colors -->
<div class="smallscroll overflow-auto h-64" style="--sb-color: #3b82f6">
  <!-- Blue scrollbars -->
</div>

<!-- Textarea with custom resize handle -->
<textarea class="resizer resize w-full h-32">
  <!-- Textarea with custom resize grip -->
</textarea>

Usage

Tailwind CSS v4

Method 1: CSS Import (Recommended for v4)

/* In your main CSS file (e.g., `app.css` or `index.css`) */
@import "tailwindcss";
@plugin "tailwindcss-plugin-overflow-tw4";

/* or connect it to Tailwind CSS js configuration */
@config '../tailwind.config.js';
/* or with a relative path if installed locally */
@import "tailwindcss";
@plugin "../node_modules/tailwindcss-plugin-overflow-tw4";

Method 2: JavaScript Configuration

// Add the plugin to your Tailwind CSS v4 configuration:
// tailwind.config.js or tailwind.config.ts
import overflowPlugin from 'tailwindcss-plugin-overflow-tw4';

export default {
  plugins: [
    overflowPlugin,
  ],
};
// Or if using ESM in a JavaScript file:
// tailwind.config.js
import overflowPlugin from 'tailwindcss-plugin-overflow-tw4';

/** @type {import('tailwindcss').Config} */
export default {
  content: ['./src/**/*.{html,js,jsx,ts,tsx}'],
  plugins: [overflowPlugin],
};

Tailwind CSS v3

For Tailwind CSS v3, use CommonJS format:

// tailwind.config.js
const overflowPlugin = require('tailwindcss-plugin-overflow-tw4');

/** @type {import('tailwindcss').Config} */
module.exports = {
  content: ['./src/**/*.{html,js,jsx,ts,tsx}'],
  plugins: [overflowPlugin],
};

Or with ES modules:

// tailwind.config.mjs
import overflowPlugin from 'tailwindcss-plugin-overflow-tw4';

/** @type {import('tailwindcss').Config} */
export default {
  content: ['./src/**/*.{html,js,jsx,ts,tsx}'],
  plugins: [overflowPlugin],
};

Development

# Install dependencies
pnpm install
# Build the plugin
pnpm run build
# Debug the plugin
# Or use VS Code's debugger with the provided launch configuration.
pnpm run debug
# Publish the plugin to npm
pnpm run publish:npm

Browser Compatibility

  • Overflow overlay: Supported in Chromium-based browsers (Chrome, Edge, Opera). Falls back gracefully in other browsers.
  • Smallscroll: Works in all modern browsers with optimized styling for both Firefox and WebKit/Blink browsers.
  • Resizer: Works in WebKit/Blink browsers (Chrome, Edge, Safari, Opera).

Requirements

  • Node.js >= 18.0.0
  • pnpm >= 10.0.0 (for development)
  • Tailwind CSS v3.x or v4.x