The GiveStation Donation widget provides an easy and customizable way to integrate crypto donation functionalities into your platforms. It supports multiple blockchain networks, various embed options, and extensive customization for seamless integration into your web applications or content platforms.
The primary widget for accepting crypto donations. It can be embedded as an iframe or directly integrated into React applications.
A button component for embedding donations directly into blog posts or articles, enabling seamless monetization for creators.
A visual builder for creating and customizing donation widgets. This feature allows users to personalize their widgets to match their brand identity.
- Multi-chain Support: Supports Ethereum, Optimism, Polygon, Base, Arbitrum, Scroll, Celo, zkSync, and Blast networks.
- Multiple Recipients: Customizable share splits among multiple recipients.
- Theme Customization: Modify colors, button styles, sizes, and enable dark mode.
- Embed Options:
- iframe
- Button
- Link
- QR Code
- NPM package
- Wallet Connection: Powered by RainbowKit.
- Transaction Handling: Utilizes ethers.js for seamless transaction processing.
- Type Safety: Built with TypeScript for robust development.
Embed the widget in your website with a simple iframe:
<iframe
src="https://youbuidl.xyz/embed?project={PROJECT_CONFIG}"
width="100%"
height="400px"
style="border:none;border-radius:12px;box-shadow:0 2px 8px rgba(0,0,0,0.1);"
title="Donation Widget"
></iframe>
Run the following command to install the package:
npm install @youbuidl/donation-sdk
Import and integrate the DonationWidget
into your React component:
import { DonationWidget } from '@youbuidl/donation-sdk';
const MyPage = () => {
const project = {
id: 'unique-id',
name: 'My Project',
recipients: [
{
address: '0x...', // Recipient wallet address
chainId: 1, // Ethereum Mainnet
share: 100 // Percentage share
}
],
theme: {
primaryColor: '#3B82F6',
buttonStyle: 'rounded',
size: 'medium',
darkMode: false
}
};
return <DonationWidget project={project} />;
};
Use the PostDonationButton
to add donation functionalities to blog posts:
import { PostDonationButton } from '@youbuidl/donation-sdk';
const BlogPost = ({ post }) => {
return (
<article>
<h1>{post.title}</h1>
<p>{post.content}</p>
<PostDonationButton
post={{
id: post.id,
title: post.title,
content: post.excerpt,
coverImage: post.image,
author: {
id: 'author-id',
name: 'Author Name',
donationConfig: {
recipients: [
{
address: '0x...',
chainId: 1,
share: 100
}
]
}
}
}}
/>
</article>
);
};
- Visit Givestation/widget.
- Click "Create Widget".
- Fill in your details:
- Name and description
- Wallet addresses and networks
- Customize the appearance of your widget.
- Choose your preferred embed option:
- Website embed code
- Shareable link
- QR code for mobile
- Copy and use the generated code or link.
- Ethereum Mainnet
- Optimism
- Polygon
- Base
- Arbitrum One
- Scroll
- Celo
- zkSync Era
- Blast
- Use multiple recipients to split donations among team members.
- Ensure shares add up to 100%.
- Consider using a multisig wallet for team funds.
- Choose networks with lower gas fees for smaller donations.
- Support multiple networks to provide donors with options.
- Leverage Layer 2 solutions for better user experiences.
- Test the widget thoroughly before deployment.
- Provide clear donation instructions.
- Add suggested donation amounts for guidance.
- Show appreciation messages after successful donations.
- Match widget colors to your brand identity.
- Choose button sizes that fit your design.
- Enable dark mode for compatibility with dark themes.
- Use clear call-to-action text on buttons.
- Verify Recipient Addresses: Double-check recipient wallet addresses.
- Use Secure Wallets: Always use hardware wallets for receiving funds.
- Multisig Wallets: Consider using multisig wallets for team projects.
- Monitor Transactions: Regularly review transactions for anomalies.
- Private Key Management: Keep private keys secure and confidential.
This documentation provides a comprehensive guide to integrating and customizing the GiveStation Donation SDK. Follow the installation and integration steps carefully, and leverage the customization options to enhance donor engagement. If you have any questions or require further assistance, feel free to contact our support team.