Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@getchange/change-drop-in

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@getchange/change-drop-in

UI element that lets users donate crypto

  • 1.1.0
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

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 will always be free.

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.

All attributes
PropertyDescription
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.
solanaAdd 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
PropertyDescription
--colorText color
--background-colorComponent background
--color-primaryPrimary and selected button text color
--color-disabledDisabled button text color
--background-color-primaryPrimary and selected button background color
--background-color-primary-hoverHovered primary and selected button background color
--background-color-disabledDisabled button background color
--input-border-colorInput border color
--input-border-radiusInput border radius
--input-colorInput text color
--input-background-colorInput background color
--input-background-color-hoverHovered input background color. Only applies to button inputs, not text inputs.
--input-color-hoverHovered input text color
--input-placeholder-colorInput placeholder color

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

DefaultCustomized

<change-drop-in>

Documentation coming soon.

FAQs

Package last updated on 14 Mar 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc