Ramadhan Giving Widget Documentation
JavaScript SDK

Customization

Customize the appearance of the Ramadhan donation button

Button options

Pass an options object to renderButton() to customize the button.

text (string)

Label on the button. Default: "Automate Your Giving".

ramadhan.renderButton({ text: "Donate with Ramadhan" });

icon (boolean | string | false)

  • true or omitted — Show the default arrow icon on the right of the text.
  • false — Text only, no icon.
  • string (URL) — Use a custom image as the icon.
ramadhan.renderButton({ text: "Donate", icon: true });
ramadhan.renderButton({ text: "Donate", icon: false });
ramadhan.renderButton({ text: "Donate", icon: "https://example.com/icon.png" });

style (object)

Override the button’s look. The button uses the charity’s primary theme colour by default when available.

PropertyDescriptionDefault
backgroundColorBackground colourCharity theme or #C7EF00
colorText and icon colour#fff
paddingButton padding12px 24px
borderRadiusBorder radius4px
fontFamilyFont familyinherit
fontWeightFont weight600
ramadhan.renderButton({
  text: "Donate Now",
  icon: true,
  style: {
    backgroundColor: "#0066cc",
    color: "#ffffff",
    padding: "16px 32px",
    borderRadius: "8px",
  },
});