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

comments-react

v1.1.4

Published

A React component to add comments with Firebase support

Downloads

27

Readme

Comments-React Module (using Firebase)

Comments module Comments module

Effortlessly add a robust comment system to your blog or website! 🚀
The Comments-React Module is a lightweight, feature-packed library built with modern tools like React, TypeScript, and Tailwind CSS.
Designed for flexibility and ease of use, it offers a seamless way to manage comments while maintaining control over customization and moderation.

Démonstration GIF


✨ Features

  • Firebase Integration: All comments are stored securely in Firebase, ensuring scalability and reliability.
  • Full CRUD Support: Add, edit, or delete your comment with ease.
  • Smart Moderation: Built-in profanity filtering using the powerful leo-profanity module.
  • Customizable:
    • Support for changing languages and text.
    • Change color for button, text(and svg) and background !
    • Adjustable character limits to suit your needs.
    • Prevent spamming with anti-multi-post protection.
  • Modern Tech Stack: Built with React, TypeScript, and styled using Tailwind CSS for a clean and responsive UI.

🚀 Quick Start

Installation

Install the package via npm or yarn:

npm install comments-react

Firebase config

this module use firebase config so you have to create an account.(it's free, choose Firestore Database)

const firebaseConfig = {
    apiKey: process.env.NEXT_PUBLIC_FIREBASE_APIKEY,
    authDomain: process.env.NEXT_PUBLIC_FIREBASE_AUTHDOMAIN,
    projectId: process.env.NEXT_PUBLIC_FIREBASE_PROJECTID,
    storageBucket: process.env.NEXT_PUBLIC_FIREBASE_STORAGEBUCKET,
    messagingSenderId: process.env.NEXT_PUBLIC_FIREBASE_MESSAGINGSENDERID,
    appId: process.env.NEXT_PUBLIC_FIREBASE_APPID,
    measurementId: process.env.NEXT_PUBLIC_FIREBASE_MEASUREMENTID
  };

1. Add Google Authentication

Google Auth

2. Create collection named "comments" (empty, this module will hydrate it)

Create collection

3. Protect with rules

Rules

Exemple of your component

"use client";

import { Comments } from "comments-react";

const Comment = ({ pageUid, lang }: { pageUid: string, lang: string }) => {
  const firebaseConfig = {
    apiKey: process.env.NEXT_PUBLIC_FIREBASE_APIKEY,
    authDomain: process.env.NEXT_PUBLIC_FIREBASE_AUTHDOMAIN,
    projectId: process.env.NEXT_PUBLIC_FIREBASE_PROJECTID,
    storageBucket: process.env.NEXT_PUBLIC_FIREBASE_STORAGEBUCKET,
    messagingSenderId: process.env.NEXT_PUBLIC_FIREBASE_MESSAGINGSENDERID,
    appId: process.env.NEXT_PUBLIC_FIREBASE_APPID,
    measurementId: process.env.NEXT_PUBLIC_FIREBASE_MEASUREMENTID
  };

  return <Comments firebaseConfig={firebaseConfig} pageUid={pageUid} />;
};

export default Comment;

Props

Settings

| Property | Types | Default | | ----------------- | :-----: | :------------------------------------------------------: | | firebaseConfig | object | firebaseConfig | | pageUid | string | pageUid | | profanityLanguage | string | "en" (only "en", "fr", "ru") | | preventMultiPosts | boolean | true (the user have to wait other comment to post again) | | maxChars | number | 1000 | | lang | string | lang (date only) |

Style

| Property | Types | Default | | ---------------- | :----: | :---------------------------------: | | backgroundColor | string | "#FFFFFF" | | textColor | string | "#10172A" (surcharge svg color too) | | buttonColor | string | "#232d47" | | buttonHoverColor | string | "#10172A" | | fontPrim | string | ""(override tailwind font) | | fontSec | string | "" (override tailwind font) |

Texts

texts={{
    placeholder=""
    btnAdd=""
    ....
}}

| Property | Types | Default | | ---------------- | :----: | :--------------------------------------------------: | | placeholder | string | "Your comment" | | btnAdd | string | "Add a comment" | | btnEdit | string | "Edit" | | btnCancel | string | "Cancel" | | errorCharac | string | "Please do not exceed 1000 characters" | | errorAdd | string | "You need to wait for another user to add a comment" | | errorUrlAndMail | string | "Please do not include URLs or email addresses" | | characLeft | string | "Characters left" | | dateAt | string | "at" | | dateThe | string | "on" | | dateEdit | string | "Edited on" | | dateThe | string | "on" | | btnModalConfirm | string | "Confirm" | | titleModalDelete | string | "Delete this comment" | | connexionTitle | string | "Log in to add a comment" | | connexionButton | string | "Log in with Google" |

Contact

If you have any question feel free to contact me on my website 😉 www.meetguillaume.dev