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

paymygas

v0.1.1

Published

A React component for crypto builders to receive donations

Readme


🚀 Overview

PayMyGas is a powerful, customizable React component that enables Web3 developers and content creators to easily accept crypto donations. Built on the Base blockchain (with support for other EVM chains), PayMyGas offers a frictionless experience for both developers and end-users.

With crypto donations themed around "paying for gas," this component adds a playful yet practical way to support your favorite projects and creators.

✨ Features

  • 🔌 Plug and Play: Simple integration into React applications
  • 🎨 Fully Customizable: Style it to match your brand
  • 🔗 Multi-Chain Support: Works with Base by default, configurable for other EVM chains
  • 👛 RainbowKit Integration: Connect to popular wallets seamlessly
  • 💸 Flexible Donations: Preset amounts or custom input
  • 🎭 Gas-Themed UX: Engaging metaphor that resonates with crypto users
  • 📱 Responsive Design: Works beautifully on all devices

📦 Installation

# Using npm
npm install paymygas

# Using yarn
yarn add paymygas

# Using pnpm
pnpm add paymygas

🔧 Quick Start

import { PayMyGas } from "paymygas";
import "@rainbow-me/rainbowkit/styles.css";
import { RainbowKitProvider, getDefaultConfig } from "@rainbow-me/rainbowkit";
import { WagmiProvider } from "wagmi";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { base } from "wagmi/chains";
import { http } from "viem";

// Create a query client for React Query
const queryClient = new QueryClient();

// Configure RainbowKit
const config = getDefaultConfig({
  appName: "My App",
  projectId: "YOUR_PROJECT_ID", // Get one from https://cloud.walletconnect.com
  chains: [base],
  transports: {
    [base.id]: http(),
  },
});

function App() {
  return (
    <WagmiProvider config={config}>
      <QueryClientProvider client={queryClient}>
        <RainbowKitProvider>
          <PayMyGas
            recipientAddress="0x1234abcd..."
            buttonText="⛽️ Pay My Gas"
            modalTitle="Support My Work"
            modalDescription="Choose an amount to cover some gas and support ongoing development!"
          />
        </RainbowKitProvider>
      </QueryClientProvider>
    </WagmiProvider>
  );
}

🛠️ Configuration Options

| Prop | Type | Description | Required | | ---------------- | ------ | ------------------------------------------------------ | -------- | | recipientAddress | string | Crypto wallet address to receive donations | ✅ | | chainId | number | Chain ID for blockchain transactions (default is Base) | ❌ | | buttonText | string | Customizable text displayed on the button | ❌ | | buttonClassName | string | Additional Tailwind classes for button styling | ❌ | | modalTitle | string | Title displayed on the modal | ❌ | | modalDescription | string | Brief description/instructions within the modal | ❌ | | donationOptions | object | Custom donation options to override defaults | ❌ |

🎁 Donation Options

By default, PayMyGas provides these playful donation options:

  • Spare Change 🪙 ($5 USDC): For sending a small tip
  • Half Tank ⛽ ($10 USDC): For sending a moderate donation
  • Full Tank 🚀 ($20 USDC): For generous support
  • Custom ⚙️: User-specified amount (USDC or native token)

Customizing Options

import { PayMyGas } from "paymygas";

const customOptions = {
  spare_change: {
    label: "Coffee",
    value: 3,
    description: "Buy me a coffee",
    emoji: "☕",
  },
  half_tank: {
    label: "Lunch",
    value: 15,
    description: "Buy me lunch",
    emoji: "🍔",
  },
  // Only specify the options you want to customize
};

function App() {
  return (
    <PayMyGas
      recipientAddress="0x1234abcd..."
      donationOptions={customOptions}
    />
  );
}

🔒 Supported Wallets

PayMyGas leverages RainbowKit to connect to all major wallets:

  • MetaMask
  • Coinbase Wallet
  • Rainbow
  • WalletConnect
  • And many more!

💻 Development

# Clone the repository
git clone https://github.com/yourusername/paymygas.git
cd paymygas

# Install dependencies
npm install

# Start the development server
npm run dev

# Build for production
npm run build

📚 Examples

Visit our examples page to see PayMyGas in action across various applications.

📝 License

MIT

🤝 Contributing

We welcome contributions! Please feel free to submit a Pull Request.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/amazing-feature)
  3. Commit your Changes (git commit -m 'Add some amazing feature')
  4. Push to the Branch (git push origin feature/amazing-feature)
  5. Open a Pull Request