The Button Widget creates an attractive, clickable button on your website that opens a donation form in a popup modal. It’s perfect for adding donation functionality without disrupting your page layout.
Prerequisites
Before using the Button Widget, make sure you’ve installed the Widgets library .
Quick Setup
The fastest way to add a button widget is through the Givebutter Dashboard:
Visit your Givebutter Dashboard
Select your campaign and navigate to Sharing > Widgets
Choose Button as the widget type and customize the appearance
Copy the generated code and paste it on your site
< givebutter-widget id = "YOUR_WIDGET_ID" ></ givebutter-widget >
Manual Setup
For full control without using the dashboard, create buttons directly with the <givebutter-button> tag:
Basic Button
Customized Button
Multiple Buttons
< givebutter-button campaign = "{YOUR_CAMPAIGN_CODE}" ></ givebutter-button >
Configuration Options
Customize your button’s appearance by adding attributes to the <givebutter-button> element:
Required Attributes
Attribute Description Example campaignYour campaign code (from your dashboard) my-campaign
Styling Attributes
Attribute Description Default Type labelText displayed on the button DonateString hide-labelHide the label text (icon only) falseBoolean label-colorColor of the text and icon #FFFFFFHex Color Code background-colorBackground color of the button #3366FFHex Color Code border-colorColor of the button border None Hex Color Code border-widthWidth of the border in pixels 0Number border-radiusCorner roundness (higher = more rounded) 100Number drop-shadowDisplay a shadow beneath the button trueBoolean iconIcon to display heartheart, gift, giving_hands, ticket, noneicon-positionPosition of the icon leftleft, righttypeHow the button opens the form modalmodal, linkmax-widthMaximum width of the modal 560pxCSS value
Positioning
Use these attributes to create a fixed-position floating button:
Attribute Description Default Options positionFixed position on the screen None top-left, top-right, middle-left, middle-right, bottom-left, bottom-rightvertical-offsetVertical offset from edge (pixels) 25Number horizontal-offsetHorizontal offset from edge (pixels) 25Number
Examples
Troubleshooting
Color not working? Hex codes must include the # symbol (e.g., #FF8A00 not FF8A00).