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

@noahmpauls/tw-counter

v1.0.1

Published

A Tailwind CSS plugin that adds utility classes for CSS counters.

Readme

Tailwind CSS Counter Plugin

A Tailwind CSS plugin that adds utility classes for CSS counters.

Install

Install the plugin from NPM:

npm install --save-dev @noahmpauls/tw-counter

In your Tailwind project's tailwind.config.js file, add the counter plugin:

// tailwind.config.js

const counter = require('@noahmpauls/tw-counter');

module.exports = {
  content: [
    //...
  ],
  theme: {
    extend: {},
  },
  plugins: [
    counter
  ],
}

Usage

Examples

Given the following HTML:

<pre class="count-default">
  <code class="count-inc-default before:content-[counter(default)]"> line of code</code>
  <code class="count-inc-default-8 before:content-[counter(default)]"> line of code</code>
  <code class="-count-inc-default-3 before:content-[counter(default)]"> line of code</code>
</pre>

The generated text will be:

1 line of code
9 line of code
6 line of code

Using arbitrary values:

Arbitrary values can be used to give a custom name to the counter being used, and to reset/increment by custom values.

Given the following HTML:

<pre class="count-[line_40]">
  <code class="count-inc-[line_3] before:content-[counter(line)]"> line of code</code>
  <code class="-count-inc-[line] before:content-[counter(line)]"> line of code</code>
  <code class="count-inc-[line_17] before:content-[counter(line)]"> line of code</code>
</pre>

The generated text will be:

43 line of code
42 line of code
59 line of code

Generated Classes

The plugin generates the following utility classes:

Create/Reset Counters: | Class Name | CSS | Description | | - | - | - | | count-default | counter-reset: default; | resets the counter named default | | count-default-0 | counter-reset: default 0; | reset the counter named default to 0 explicitly | | count-rev-default | counter-reset: reversed(default);| resets the counter named default to its reversed starting value (limited browser support) |

Increment Counters: | Class Name | CSS | Description | | - | - | - | | count-inc-default | counter-increment: default 1; | increments the counter named default by 1 | | -count-inc-default | counter-increment: default -1; | decrements the counter named default by 1 | | count-inc-default-{#} | counter-increment: default {#}; | increments the counter named default by the given amount | | -count-inc-default-{#} | counter-increment: default -{#}; | decrements the couner named default by the given amount |

Theme Customization

Theme customization falls under count.reset and count.inc:

theme: {
  'count': {
    'reset': {
      'default-5': 'default 5' // `count-default-5` reset the default counter to 5
    },
    'inc': {
      'default': 'default 2' // `count-inc-default` increments the default counter by 2
    }
  }
}