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

simple-donation

v1.3.4

Published

A customizable donation module for Nuxt 3 projects

Readme

Simple donation module for Nuxt

Last Commit License Language npm version npm downloads

A customizable donation component for Nuxt 3 and Nuxt 4 projects, with PayPal integration for one-time donations in EUR.

Live demo

You can see it in action at https://wikiherbalist.com/donazioni.

Features

  • Compatible with Nuxt 3 and Nuxt 4
  • PayPal integration for secure payments
  • Customizable donation amounts
  • Multilingual support: EN, IT, ES, FR, DE
  • Responsive design with Tailwind CSS
  • Configurable color scheme via CSS variables
  • Custom FAQ sidebar
  • XSS protection via DOMPurify sanitization
  • Full TypeScript support

Requirements

  • Nuxt 3.x or Nuxt 4.x
  • Node.js 18.x or higher

Installation

  1. Install the package:
npm install simple-donation
# or
yarn add simple-donation
  1. Add the module to your nuxt.config.ts as described in the Configuration section.

  2. Create a .env file in your project root and add your PayPal client ID:

PAYPAL_CLIENT_ID=your_paypal_client_id_here

Usage

Once installed and configured, add the component to any page or component:

<template>
  <div>
    <h1>Support our project</h1>
    <SimpleDonation />
  </div>
</template>

Configuration

Configure the module in nuxt.config.ts:

export default defineNuxtConfig({
  modules: [
    ['simple-donation', {
      paypal: {
        clientId: process.env.PAYPAL_CLIENT_ID
      },
      colors: {
        primary: '#3B82F6',   // main buttons and highlights
        secondary: '#1E40AF', // secondary elements
        accent: '#60A5FA',    // accents and focus states
        background: '#FFFFFF' // component background
      }
    }]
  ]
})

Customization

Language

Use the lang prop to set the component language. Supported values: en, it, es, fr, de. Defaults to en.

<SimpleDonation lang="it" />

All UI labels, step names, button text, and default FAQ content will be displayed in the chosen language.

Color scheme

The four color options available are:

  • primary: main color for buttons and highlights
  • secondary: used for secondary elements and hover states
  • accent: used for accents and focus states
  • background: background color of the component

Custom FAQs

Pass a faqs prop to override the default FAQ items shown in the sidebar:

<template>
  <div>
    <SimpleDonation lang="it" :faqs="customFaqs" />
  </div>
</template>

<script setup>
const customFaqs = [
  {
    question: 'Come vengono utilizzate le donazioni?',
    answer: 'Le donazioni supportano lo sviluppo e la manutenzione del progetto.'
  },
  {
    question: 'Il sistema è sicuro?',
    answer: 'Sì, tutte le transazioni utilizzano sistemi con elevati livelli di sicurezza.'
  },
  {
    question: 'Posso fare una donazione ricorrente?',
    answer: 'Al momento supportiamo solo donazioni una tantum.'
  }
]
</script>

Each FAQ item needs a question and an answer property. HTML is allowed and automatically sanitized.

Roadmap

  • Multiple currencies: support for currencies other than EUR.
  • Recurring donations: let donors set up a monthly contribution.
  • More payment options: including cryptocurrency.
  • Automatic thank-you emails to donors after each transaction.

Contributing

Contributions are welcome. Feel free to open an issue or submit a pull request on GitHub.

License

This project is open source and available under the MIT License.