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

ecp-astro

v0.1.0

Published

Drop-in Ethereum Comments Protocol integration for Astro blogs

Readme

Astro Ethereum Comments

Drop-in Ethereum Comments Protocol integration for Astro blogs and websites.

Installation

npm install astro-ethereum-comments
# or
yarn add astro-ethereum-comments
# or
pnpm add astro-ethereum-comments

Peer Dependencies

Make sure you have the following peer dependencies installed:

npm install react react-dom viem wagmi @tanstack/react-query @tanstack/query-core

Usage

Basic Usage (Comments Display Only)

---
import { EthereumCommentsEmbed } from 'astro-ethereum-comments/embed';
---

<article>
  <h1>My Blog Post</h1>
  <p>Content...</p>
  
  <!-- Add comments at the end of your post -->
  <EthereumCommentsEmbed />
</article>

Full Featured (Display + Editor)

---
import { EthereumComments } from 'astro-ethereum-comments';
---

<article>
  <h1>My Blog Post</h1>
  <p>Content...</p>
  
  <!-- Add comments with editor -->
  <EthereumComments 
    showEditor={true}
    theme={{ mode: 'dark' }}
  />
</article>

Custom Configuration

---
import { EthereumComments } from 'astro-ethereum-comments';

const customTheme = {
  mode: 'light',
  primaryColor: '#3b82f6',
  backgroundColor: '#ffffff',
  textColor: '#1f2937',
  borderColor: '#e5e7eb',
  fontFamily: 'Inter, system-ui, sans-serif'
};

const editorConfig = {
  placeholder: 'Share your thoughts...',
  autoFocus: false,
  maxLength: 5000,
  allowUploads: true,
  pinataGatewayUrl: 'https://gateway.pinata.cloud',
  maxFileSize: 10 * 1024 * 1024 // 10MB
};
---

<EthereumComments 
  uri="https://myblog.com/posts/my-article"
  useCurrentUrl={false}
  theme={customTheme}
  showEditor={true}
  editorConfig={editorConfig}
  className="my-custom-comments"
/>

Using Individual Components

---
// Just the display component
import { EthereumCommentsEmbed } from 'astro-ethereum-comments/embed';

// Just the editor component
import { EthereumCommentsEditor } from 'astro-ethereum-comments/editor';
---

<!-- Display comments -->
<EthereumCommentsEmbed 
  theme={{ mode: 'auto' }}
/>

<!-- Separate editor -->
<EthereumCommentsEditor 
  editorConfig={{
    placeholder: 'Add your comment...'
  }}
/>

Configuration

Theme Options

| Property | Type | Default | Description | |----------|------|---------|-------------| | mode | 'light' \| 'dark' \| 'auto' | 'light' | Color scheme | | primaryColor | string | '#3b82f6' | Primary accent color | | backgroundColor | string | '#ffffff' | Background color | | textColor | string | '#1f2937' | Text color | | borderColor | string | '#e5e7eb' | Border color | | fontFamily | string | System font | Font family |

Editor Configuration

| Property | Type | Default | Description | |----------|------|---------|-------------| | placeholder | string | 'Write your comment...' | Placeholder text | | autoFocus | boolean | false | Auto focus on mount | | maxLength | number | - | Maximum character length | | allowUploads | boolean | false | Enable file uploads | | pinataGatewayUrl | string | - | Pinata IPFS gateway URL | | uploadUrl | string | - | Custom upload endpoint | | allowedMimeTypes | string[] | Images & videos | Allowed file types | | maxFileSize | number | 10MB | Maximum file size |

Styling

The component comes with default styles but can be customized using CSS:

/* Override default styles */
.ethereum-comments-container {
  /* Your custom styles */
}

.ecp-add-comment-btn {
  background-color: var(--primary-color);
  /* More custom styles */
}

.ecp-editor-container {
  border-radius: 1rem;
  /* More custom styles */
}

TypeScript Support

This package includes TypeScript definitions. Import types as needed:

import type { 
  EthereumCommentsProps,
  ThemeConfig,
  EditorConfig 
} from 'astro-ethereum-comments';

Astro Configuration

Make sure your astro.config.mjs supports React components:

import { defineConfig } from 'astro/config';
import react from '@astrojs/react';

export default defineConfig({
  integrations: [react()],
});

Features

  • 🚀 Easy Integration - Drop-in component for any Astro site
  • 🎨 Customizable - Flexible theming and configuration options
  • 📝 Rich Text Editor - Full-featured editor with mentions and uploads
  • 🔗 ENS & Farcaster Support - Built-in support for Web3 identities
  • 📱 Responsive - Works on all device sizes
  • 🌙 Dark Mode - Automatic and manual theme switching
  • 🔒 Secure - Ethereum-based authentication
  • Performance - Optimized for fast loading

License

MIT

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Support

For issues and questions, please open an issue on GitHub.