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

@compatis/payload-charcount

v1.0.1

Published

A Payload CMS plugin that counts characters in richtext, textarea and text fields fields, similar to the SEO plugin characters counter. Useful for editors to track content length.

Readme

Payload Plugin CharCount

A Payload CMS plugin that counts characters in richtext, textarea and text fields, similar to the SEO plugin character counter. Useful for editors to track content length.

Features

  • 📊 Character counting for text fields, textarea fields, and richtext fields
  • 🌍 Multi-language support with translations in 40+ languages
  • 🎨 Consistent styling with Payload
  • TypeScript support with full type definitions
  • 🔧 Easy integration with existing Payload projects

Installation

npm install @compatis/payload-charcount
# or
yarn add @compatis/payload-charcount
# or
pnpm add @compatis/payload-charcount

Usage

1. Add the plugin to your Payload config

import { buildConfig } from 'payload/config'
import charCountPlugin from '@compatis/payload-charcount'

export default buildConfig({
  plugins: [
    charCountPlugin(), // Add the plugin
  ],
  // ... rest of your config
})

2. Use the character counting fields

import {
  CharcountTextField,
  CharcountTextareaField,
  CharcountRichTextField,
} from '@compatis/payload-charcount/fields'

export const Posts = {
  slug: 'posts',
  fields: [
    CharcountTextField(
      {
        name: 'title',
        label: 'Title',
        required: true,
      },
      {
        max: 100,
        min: 90,
      },
    ),
    CharcountTextareaField(
      {
        name: 'description',
        label: 'Description',
      },
      {
        max: 500,
        min: 450,
      },
    ),
    CharcountRichTextField(
      {
        name: 'content',
        label: 'Content',
      },
      {
        max: 2000,
        min: 1750,
      },
    ),
  ],
}

Field Options

CharcountTextField / CharcountTextareaField / CharcountRichTextField

The field functions take two parameters:

  1. Field configuration - Standard Payload field properties (name, label, required, etc.)
  2. CharCount options - Character counting configuration

| Option | Type | Description | | ------ | -------- | ----------------------- | | max | number | Maximum character limit | | min | number | Minimum character limit |

Translations

The plugin includes translations for 40+ languages.

Requirements

  • Payload CMS 3.37.0+
  • Node.js 18.20.2+ or 20.9.0+
  • TypeScript (recommended)

Support

If you have any questions or issues, please open an issue on GitHub.

Roadmap

v1.1.0 (Coming Soon)

  • [ ] Optional min/max - Only one of min or max required, not both
  • [ ] Hint text - Optional hint text below counter (like Payload SEO plugin)

Future Ideas

  • [ ] Word counting - Count words instead of characters
  • [ ] Custom validation messages - Personalized texts

Have a feature request? Open an issue and let us know!

Acknowledgments

Special thanks to the Payload CMS team for creating such an amazing CMS and for the inspiration and translations from their SEO plugin's character counting functionality.