← Back

<doge-donate> web component

Purpose


A donation widget that combines preset amounts with a QR code for easy Dogecoin donations.

Usage


1. Add the script to your webpage.


          <script
            type="module"
            src="https://fetch.dogecoin.org/doge-donate.js">
          </script>
          

2. Place the doge-donate element on your page.

3. Test the donation options and QR codes to ensure they generate correct Dogecoin URIs.

Properties


Name Description
address Your Dogecoin receiving address
presets The donation options presented as buttons
selectedAmount The initially selected value
listLabel Text label placed above the presets
qrLabel Text label placed above the QR code

Styling


Name Description
size Select a size sm, md, lg, xl
theme Select a predefined theme:
such-doge,
so-coin,
much-dev,
very-community
When used, the theme determines the background and fill color(s).
tint Overrides the color of the preset options eg: #CCC, red
background The QR background color. This can be any valid CSS color
fill The QR dots color. This can be any valid CSS color.
Provide two colors for a simple gradient
yellow
#ffc107
"#ffc107, blue"
img Set a custom image by providing a URL. This can be a png, jpg or gif.

Slots


Name Description
label-list Provided content will be rendered above the list of presets
label-qr Provided content will be rendered above the QR code

Examples


Classic Theme

Developer Theme

Community Theme

Custom Styling