> ## Documentation Index
> Fetch the complete documentation index at: https://docs.givebutter.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Interactive Examples

> See Givebutter Widgets in action with interactive, customizable examples.

export const GivebutterWidget = ({widgetType = 'widget', id, ...props}) => {
  const tagName = `givebutter-${widgetType}`;
  const attrs = Object.entries(props).map(([key, value]) => {
    const attrName = key.replace(/([A-Z])/g, '-$1').toLowerCase();
    return `${attrName}="${String(value)}"`;
  }).join(' ');
  const idAttr = id ? `id="${id}"` : '';
  const html = `<${tagName} ${idAttr} ${attrs}></${tagName}>`;
  return <div dangerouslySetInnerHTML={{
    __html: html
  }} />;
};

Explore live, interactive examples of Givebutter Widgets. These are real, functioning widgets that demonstrate how they'll look and behave on your website.

<Info>
  **Note:** These examples use a demo Givebutter account. When you implement widgets on your site,
  you'll use your own Account ID and Campaign Codes.
</Info>

## Button Widget

<Tabs>
  <Tab title="Default">
    <div style={{padding: '2rem', textAlign: 'center', background: '#f9fafb', borderRadius: '8px', marginBottom: '1rem'}}>
      <GivebutterWidget widgetType="button" campaign="KN5NON" />
    </div>

    ```html theme={null}
    <givebutter-button campaign="YOUR_CAMPAIGN_CODE"></givebutter-button>
    ```
  </Tab>

  <Tab title="Event Tickets">
    <div style={{padding: '2rem', textAlign: 'center', background: '#f9fafb', borderRadius: '8px', marginBottom: '1rem'}}>
      <GivebutterWidget widgetType="button" campaign="KN5NON" label="Get Tickets" icon="ticket" background-color="#6366F1" label-color="#FFFFFF" border-radius="8" />
    </div>

    ```html theme={null}
    <givebutter-button
      campaign="YOUR_CAMPAIGN_CODE"
      label="Get Tickets"
      icon="ticket"
      background-color="#6366F1"
      label-color="#FFFFFF"
      border-radius="8"
    ></givebutter-button>
    ```
  </Tab>

  <Tab title="Ghost">
    <div style={{padding: '2rem', textAlign: 'center', background: '#f9fafb', borderRadius: '8px', marginBottom: '1rem'}}>
      <GivebutterWidget widgetType="button" campaign="KN5NON" label="Learn More" background-color="transparent" label-color="#059669" border-color="#059669" border-width="2" border-radius="8" drop-shadow="false" icon="none" />
    </div>

    ```html theme={null}
    <givebutter-button
      campaign="YOUR_CAMPAIGN_CODE"
      label="Learn More"
      background-color="transparent"
      label-color="#059669"
      border-color="#059669"
      border-width="2"
      border-radius="8"
      drop-shadow="false"
      icon="none"
    ></givebutter-button>
    ```
  </Tab>

  <Tab title="Urgent Appeal">
    <div style={{padding: '2rem', textAlign: 'center', background: '#f9fafb', borderRadius: '8px', marginBottom: '1rem'}}>
      <GivebutterWidget widgetType="button" campaign="KN5NON" label="Donate Now" background-color="#DC2626" label-color="#FFFFFF" border-radius="4" drop-shadow="false" />
    </div>

    ```html theme={null}
    <givebutter-button
      campaign="YOUR_CAMPAIGN_CODE"
      label="Donate Now"
      background-color="#DC2626"
      label-color="#FFFFFF"
      border-radius="4"
    ></givebutter-button>
    ```
  </Tab>

  <Tab title="Pill">
    <div style={{padding: '2rem', textAlign: 'center', background: '#f9fafb', borderRadius: '8px', marginBottom: '1rem'}}>
      <GivebutterWidget widgetType="button" campaign="KN5NON" label="Send a Gift" icon="gift" background-color="#EC4899" label-color="#FFFFFF" border-radius="100" />
    </div>

    ```html theme={null}
    <givebutter-button
      campaign="YOUR_CAMPAIGN_CODE"
      label="Send a Gift"
      icon="gift"
      background-color="#EC4899"
      label-color="#FFFFFF"
      border-radius="100"
    ></givebutter-button>
    ```
  </Tab>
</Tabs>

## Form Widget

<Tabs>
  <Tab title="Default">
    <div style={{maxWidth: '600px', margin: '0 auto', padding: '2rem', background: '#f9fafb', borderRadius: '12px'}}>
      <GivebutterWidget id="gV6WVg" />
    </div>

    ```html theme={null}
    <givebutter-giving-form campaign="YOUR_CAMPAIGN_CODE"></givebutter-giving-form>
    ```
  </Tab>

  <Tab title="Card Style">
    <div style={{maxWidth: '600px', margin: '0 auto', padding: '2rem', background: 'white', border: '1px solid #e5e7eb', borderRadius: '12px', boxShadow: '0 4px 6px rgba(0,0,0,0.1)'}}>
      <h3 style={{marginTop: 0, marginBottom: '1rem', color: '#111827'}}>Support Our Cause</h3>
      <p style={{marginBottom: '1.5rem', color: '#6b7280'}}>Your donation makes a real difference in our community.</p>

      <GivebutterWidget id="gV6WVg" />
    </div>

    ```html theme={null}
    <div
      style="
      max-width: 600px;
      margin: 0 auto;
      padding: 2rem;
      background: white;
      border: 1px solid #e5e7eb;
      border-radius: 12px;
      box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    "
    >
      <h3>Support Our Cause</h3>
      <p>Your donation makes a real difference in our community.</p>
      <givebutter-giving-form campaign="YOUR_CAMPAIGN_CODE"></givebutter-giving-form>
    </div>
    ```
  </Tab>

  <Tab title="Bordered Section">
    <div style={{maxWidth: '600px', margin: '0 auto', padding: '1.5rem', border: '2px solid #3b82f6', borderRadius: '8px', borderLeft: '6px solid #3b82f6'}}>
      <GivebutterWidget id="gV6WVg" />
    </div>

    ```html theme={null}
    <div
      style="
      max-width: 600px;
      margin: 0 auto;
      padding: 1.5rem;
      border: 2px solid #3b82f6;
      border-radius: 8px;
      border-left: 6px solid #3b82f6;
    "
    >
      <givebutter-giving-form campaign="YOUR_CAMPAIGN_CODE"></givebutter-giving-form>
    </div>
    ```
  </Tab>
</Tabs>

## Goal Bar Widget

<Tabs>
  <Tab title="Default">
    <div style={{maxWidth: '700px', margin: '0 auto', padding: '2rem', background: '#f9fafb', borderRadius: '8px', marginBottom: '1rem'}}>
      <GivebutterWidget widgetType="goal-bar" campaign="KN5NON" />
    </div>

    ```html theme={null}
    <givebutter-goal-bar campaign="YOUR_CAMPAIGN_CODE"></givebutter-goal-bar>
    ```
  </Tab>

  <Tab title="Custom Colors">
    <div style={{maxWidth: '700px', margin: '0 auto', padding: '2rem', background: '#f9fafb', borderRadius: '8px', marginBottom: '1rem'}}>
      <GivebutterWidget widgetType="goal-bar" campaign="KN5NON" progress-bar-color="#8B5CF6" text-color="#1F2937" />
    </div>

    ```html theme={null}
    <givebutter-goal-bar
      campaign="YOUR_CAMPAIGN_CODE"
      progress-bar-color="#8B5CF6"
      text-color="#1F2937"
    ></givebutter-goal-bar>
    ```
  </Tab>

  <Tab title="Minimal">
    <div style={{maxWidth: '700px', margin: '0 auto', padding: '2rem', background: '#f9fafb', borderRadius: '8px', marginBottom: '1rem'}}>
      <GivebutterWidget widgetType="goal-bar" campaign="KN5NON" show-raised-percentage="false" show-goal-amount="false" size="sm" />
    </div>

    ```html theme={null}
    <givebutter-goal-bar
      campaign="YOUR_CAMPAIGN_CODE"
      show-raised-percentage="false"
      show-goal-amount="false"
      size="sm"
    ></givebutter-goal-bar>
    ```
  </Tab>

  <Tab title="Large">
    <div style={{maxWidth: '700px', margin: '0 auto', padding: '2rem', background: '#f9fafb', borderRadius: '8px', marginBottom: '1rem'}}>
      <GivebutterWidget widgetType="goal-bar" campaign="KN5NON" progress-bar-color="#DC2626" size="lg" />
    </div>

    ```html theme={null}
    <givebutter-goal-bar
      campaign="YOUR_CAMPAIGN_CODE"
      progress-bar-color="#DC2626"
      size="lg"
    ></givebutter-goal-bar>
    ```
  </Tab>

  <Tab title="Thermometer">
    <div style={{maxWidth: '700px', margin: '0 auto', padding: '2rem', background: '#f9fafb', borderRadius: '8px', marginBottom: '1rem'}}>
      <GivebutterWidget widgetType="goal-bar" campaign="KN5NON" type="thermometer" progress-bar-color="#DC2626" />
    </div>

    A classic thermometer-style visualization for your fundraising progress.

    ```html theme={null}
    <givebutter-goal-bar
      campaign="YOUR_CAMPAIGN_CODE"
      type="thermometer"
      progress-bar-color="#DC2626"
    ></givebutter-goal-bar>
    ```
  </Tab>
</Tabs>

## Signup Form Widget

<Tabs>
  <Tab title="Default">
    <div style={{maxWidth: '500px', margin: '0 auto', padding: '2rem', background: '#f9fafb', borderRadius: '8px', marginBottom: '1rem'}}>
      <GivebutterWidget id="pz5bOg" />
    </div>

    ```html theme={null}
    <givebutter-signup-form account="YOUR_ACCOUNT_ID"></givebutter-signup-form>
    ```
  </Tab>

  <Tab title="With Title">
    <div style={{maxWidth: '500px', margin: '0 auto', padding: '2rem', background: '#f9fafb', borderRadius: '8px', marginBottom: '1rem'}}>
      <GivebutterWidget widgetType="signup-form" account="KN5NON" title="Stay Connected" description="Get updates about our work" />
    </div>

    ```html theme={null}
    <givebutter-signup-form
      account="YOUR_ACCOUNT_ID"
      title="Stay Connected"
      description="Get updates about our work"
    ></givebutter-signup-form>
    ```
  </Tab>

  <Tab title="Custom Button">
    <div style={{maxWidth: '500px', margin: '0 auto', padding: '2rem', background: '#f9fafb', borderRadius: '8px', marginBottom: '1rem'}}>
      <GivebutterWidget widgetType="signup-form" account="KN5NON" title="Join Our Newsletter" button-text="Subscribe Now" button-background-color="#8B5CF6" />
    </div>

    ```html theme={null}
    <givebutter-signup-form
      account="YOUR_ACCOUNT_ID"
      title="Join Our Newsletter"
      button-text="Subscribe Now"
      button-background-color="#8B5CF6"
    ></givebutter-signup-form>
    ```
  </Tab>

  <Tab title="Card Style">
    <div style={{maxWidth: '500px', margin: '0 auto', padding: '2rem', background: 'white', border: '1px solid #e5e7eb', borderRadius: '12px', boxShadow: '0 4px 6px rgba(0,0,0,0.1)'}}>
      <h3 style={{marginTop: 0, marginBottom: '0.5rem', color: '#111827'}}>Join Our Community</h3>
      <p style={{marginBottom: '1rem', color: '#6b7280'}}>Get exclusive updates and early access</p>

      <GivebutterWidget widgetType="signup-form" account="KN5NON" button-text="Count Me In" />
    </div>

    ```html theme={null}
    <div style="
      max-width: 500px;
      padding: 2rem;
      background: white;
      border: 1px solid #e5e7eb;
      border-radius: 12px;
      box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    ">
      <h3>Join Our Community</h3>
      <p>Get exclusive updates and early access</p>
      <givebutter-signup-form
        account="YOUR_ACCOUNT_ID"
        button-text="Count Me In"
      ></givebutter-signup-form>
    </div>
    ```
  </Tab>
</Tabs>
