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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@getchange/change-drop-in

v2.0.0

Published

UI element that lets users donate crypto

Downloads

28

Readme

change-drop-in

Two components for accepting crypto donations on the web.

<change-donation-form>

A component for accepting crypto donations for a nonprofit. It weighs < 10 KB gzipped.

Quick Start

Add the following HTML to your page:

<change-donation-form
  public-key="pk_live_d1acaf4c39ab38273133cb97649ddba0ecd5d76b81c8b1db7039f7ae937f9b33"
  nonprofit-id="n_B7e7Xu5RFvYHGLHDCSMQ5Yck"
></change-donation-form>
<script type="module" src="https://cdn.jsdelivr.net/npm/@getchange/change-drop-in@1/dist/change-donation-form.min.js"></script>

You now have a donation form for Make-a-Wish 501(c)(3)!

Change the nonprofit by setting the nonprofit-id attribute. To find nonprofit ids for over 200K nonprofits, sign up for free at https://api.getchange.io and navigate to the Nonprofits tab. This component does not require any payment to use on your site.

Once you've signed up, set the public-key attribute to match your account. If you're a nonprofit collecting donations for yourself, you can skip the public key. Everyone else, find your account's public key at https://api.getchange.io/developers.

All attributes

| Attribute | Description | | -------- | ----------- | | public-key (*required) | The public key of your Change account. You can find your account's public key at https://api.getchange.io/developers. | | nonprofit-id (*required) | The ID of the nonprofit you'd like to accept donations for. You can find nonprofit IDs at https://api.getchange.io. | | title-text | The title text of the element. The default is "Make a donation". | | success-url | When a coinbase donation is completed, the page containing the <change-donation-form> will redirect to this URL, if provided. | | quick-amounts | Amounts to display to the user as default donation options. Provide 3 values as a valid JSON array. For example, quick-amounts='[5, 10, 20]'. The default is [10, 20, 50]. | | metadata-* | Any attributes starting with "metdata-" will be attached to completed coinbase donations. For example, metadata-tracking-id="abcd" will add tracking-id: abcd to the resulting donation, so you can see it in your donation reports. | | solana | Add this attribute to accept SOL (Solana) donations. A second payment method option will appear in the form. |

Styles

You can change the style of the donation form using CSS custom properties. For example:

<change-donation-form
  style="
    --background-color-primary: green;
    --color-primary: white;
  "
></change-donation-form>

All style properties

| Property | Description | | -------- | ----------- | | --color | Text color | | --background-color | Component background | | --color-primary | Primary and selected button text color | | --color-disabled | Disabled button text color | | --background-color-primary | Primary and selected button background color | | --background-color-primary-hover | Hovered primary and selected button background color | | --background-color-disabled | Disabled button background color | | --input-border-color | Input border color | | --input-border-radius | Input border radius | | --input-color | Input text color | | --input-background-color | Input background color | | --input-background-color-hover | Hovered input background color. Only applies to button inputs, not text inputs. | | --input-color-hover | Hovered input text color | | --input-placeholder-color | Input placeholder color |

Here's an example of the default look, alongside a fully customized version:

Default | Customized :----------------------:|:---------------------------: |

<change-drop-in>

A component for accepting crypto donations for any nonprofit in the Change system. It weighs < 13 KB gzipped.

Quick Start

Add the following HTML to your page:

<change-drop-in
  public-key="pk_live_d1acaf4c39ab38273133cb97649ddba0ecd5d76b81c8b1db7039f7ae937f9b33"
></change-drop-in>
<script type="module" src="https://cdn.jsdelivr.net/npm/@getchange/change-drop-in@1/dist/change-drop-in.min.js"></script>

You now have a searchable donation widget, with access to all 200K vetted nonprofits in the Change system.

Once you've signed up, set the public-key attribute to match your account. You can find your account's public key at https://api.getchange.io/developers. This component does not require any payment to use on your site.

All attributes

| Property | Description | | -------- | ----------- | | public-key (*required) | The public key of your Change account. You can find your account's public key at https://api.getchange.io/developers. | | featured-nonprofits | The ids of nonprofits to feature. You can find nonprofit IDs at https://api.getchange.io. Specify ids as a JSON array, like this (the quote types are important): nonprofit-ids='["n_123", "n_abc"]' | | title | The title of the component. |

Styles

You can change the style of the donation form using CSS custom properties. For example:

<change-drop-in
  style="
    --background-color-primary: green;
    --color-primary: white;
  "
></change-drop-in>

All style properties

| Property | Description | | -------- | ----------- | | --color | Text color | | --background-color | Component background | | --color-primary | Primary and selected button text color. Affects the donation form. | | --color-disabled | Disabled button text color. Affects the donation form. | | --background-color-primary | Primary and selected button background color. Affects the donation form. | | --background-color-primary-hover | Hovered primary and selected button background color. Affects the donation form. | | --background-color-disabled | Disabled button background color. Affects the donation form. | | --input-border-color | Input border color | | --input-border-radius | Input border radius | | --input-color | Input text color | | --input-background-color | Input background color | | --input-color-hover | Hovered input text color | | --input-placeholder-color | Input placeholder color | | --search-result-background-hover | Hovered background color of search results | | --card-background-color | Card background color | | --detail-color | Color of detail elements, such as the back button and field titles |