Components Library

Embeddable fundraising UI components for any website.

Getting Started

Donately Components is a JavaScript library that lets you embed fundraising UI elements — campaign lists, donation feeds, fundraiser profiles, and forms — on any website. No backend required.

Include the Library

Add the CSS and JavaScript files from the CDN to your page:

<!-- In your <head> -->
<link rel="stylesheet" href="https://cdn.donately.com/dntly-components/2.3/donately-components.css">

<!-- Before closing </body> -->
<script src="https://cdn.donately.com/dntly-components/2.3/donately-components.min.js"></script>
The library is versioned by major.minor (e.g., 2.3). Patch updates are deployed automatically to the same URL, so you always get the latest bug fixes.

Add a Component

Place the component HTML in your page using data-dntly attributes. Each component uses a "clonable card" pattern for list items:

<div data-dntly="dntly-campaign-list-component">
  <div data-dntly="cmp-list-outer-container">
    <div data-dntly="cmp-list-inner-container">
      <!-- This card is cloned for each campaign -->
      <div data-dntly="cmp-list-card" data-dntly-clonable-card style="display:none">
        <h3 data-dntly="cmp-list-card-title"></h3>
        <p data-dntly="cmp-list-card-description"></p>
        <div data-dntly="cmp-list-card-amount-raised"></div>
      </div>
    </div>
  </div>
</div>

Initialization

Initialize all components on the page by calling buildComponents():

<script>
  function dntlyReady(name, callback) {
    window.setTimeout(function() {
      if (window[name]) { callback(); }
      else { dntlyReady(name, callback); }
    }, 10);
  }

  dntlyReady("DonatelyComponents", function() {
    DonatelyComponents.componentHandler.buildComponents({
      options: {
        "donately-id": "act_ba7d12ab27bb",
        "campaign-id": "cmp_e4b08ef12147",   // optional
        "fundraiser-id": "fndr_3ae925bf846f", // optional
        "form-id": "frm_3ae925bf846f"         // optional
      },
      afterComponentLoad: function(parentElement, componentInstanceKey) {
        // Called when each component finishes loading
      }
    });
  });
</script>

Options can also be passed via URL query parameters (e.g., ?campaign_id=cmp_xxx&limit=10) or as data attributes on the component element.

Global Options

OptionDescription
donately-idYour Donately account ID (required)
campaign-idScope components to a specific campaign
fundraiser-idScope components to a specific fundraiser
form-idScope the donation form to a specific form configuration
limitNumber of items to display per page (list components)
sortSort direction: ASC or DESC
order_byField to sort by (e.g., created_at, amount_in_cents)
build-pageGenerate a full HTML page with meta tags (campaign or fundraiser)
donately-template-hostHost domain for template pages (e.g., Webflow)
donately-template-url-styleURL style for links: webflow_v1

Campaign List

Displays a list of campaigns with titles, descriptions, progress bars, and amount raised.

Component Name

dntly-campaign-list-component

Available Data Attributes

AttributeDescription
cmp-list-card-titleCampaign title
cmp-list-card-descriptionCampaign description
cmp-list-card-amount-raisedTotal amount raised
cmp-list-card-goalCampaign goal amount
cmp-list-card-percent-fundedPercentage of goal reached
cmp-list-card-donor-countNumber of donors
cmp-list-card-donation-countNumber of donations
cmp-list-card-cover-photoCampaign cover photo (sets as background image)
cmp-list-card-linkLink to campaign detail page

Supports filtering by campaign status (draft, published, archived) and type (peer_to_peer, donation, etc.).

Fundraiser List

Displays a list of fundraisers with photos, progress, and team information.

Component Name

dntly-fundraiser-list-component

Available Data Attributes

AttributeDescription
fndr-list-card-titleFundraiser title
fndr-list-card-photoFundraiser photo
fndr-list-card-amount-raisedAmount raised
fndr-list-card-goalFundraising goal
fndr-list-card-percent-fundedPercentage of goal
fndr-list-card-typeFundraiser type (individual, team, team member)
fndr-list-card-team-nameParent team name (for team members)
fndr-list-card-linkLink to fundraiser detail page

Donation List

Displays recent donations with donor names, amounts, comments, and dates.

Component Name

dntly-donation-list-component

Available Data Attributes

AttributeDescription
don-list-card-donor-nameDonor display name
don-list-card-amountDonation amount
don-list-card-commentDonor comment
don-list-card-dateDonation date
don-list-card-ecard-messageE-card message (if applicable)

Campaign Details

Displays a full campaign page with cover photo, description, progress stats, and event countdown.

Component Name

dntly-campaign-details-component

Available Data Attributes

AttributeDescription
cmp-details-titleCampaign title
cmp-details-descriptionFull campaign description (HTML)
cmp-details-cover-photoCover photo
cmp-details-amount-raisedTotal amount raised
cmp-details-goalCampaign goal
cmp-details-percent-fundedPercentage of goal
cmp-details-donor-countNumber of unique donors
cmp-details-donation-countNumber of donations
cmp-details-start-dateCampaign start date
cmp-details-end-dateCampaign end date
cmp-details-days-leftDays remaining (event campaigns)

Fundraiser Details

Displays an individual fundraiser's profile, progress, and relationship to parent campaign or team.

Component Name

dntly-fundraiser-details-component

Available Data Attributes

AttributeDescription
fndr-details-titleFundraiser title
fndr-details-descriptionFundraiser description
fndr-details-photoFundraiser photo
fndr-details-amount-raisedAmount raised
fndr-details-goalFundraising goal
fndr-details-percent-fundedPercentage of goal
fndr-details-typeType (individual, team, team_member)
fndr-details-parent-linkLink to parent campaign
fndr-details-team-nameTeam name (for team members)

Account Details

Displays organization/account information and branding.

Component Name

dntly-account-details-component

Available Data Attributes

AttributeDescription
acct-details-nameAccount/organization name
acct-details-logoAccount logo
acct-details-descriptionAccount description

Donation Form

An embeddable donation form component. For the full-featured standalone donation form, see the Embeddable Form docs.

Component Name

dntly-donation-form-component

Fundraiser Create

Allows supporters to create their own fundraiser pages for peer-to-peer campaigns. Includes photo upload and form validation.

Component Name

dntly-fundraiser-create-component

Conditional Visibility

The logic component (dntly-logic-component) enables conditional show/hide of elements based on data values, without writing JavaScript.

Show/Hide Attributes

<!-- Show element only when condition is true -->
<div data-dntly-show-if="type==p2p_fundraisers">
  This is a peer-to-peer campaign!
</div>

<!-- Hide element when condition is true -->
<div data-dntly-hide-if="total_count==0">
  Campaign list content
</div>

Supported Operators

  • == — Equal to
  • != — Not equal to
  • && — Logical AND (combine conditions)
  • || — Logical OR (either condition)

Callbacks

The afterComponentLoad callback fires after each component finishes loading its data and rendering:

DonatelyComponents.componentHandler.buildComponents({
  options: { "donately-id": "act_ba7d12ab27bb" },
  afterComponentLoad: function(parentElement, componentInstanceKey) {
    console.log("Component loaded:", componentInstanceKey);
    // parentElement is the DOM node of the component
  }
});

CDN Documentation

Full interactive documentation for each component is available on the CDN. These auto-generated docs include all available data attributes, example markup, and live previews.

Access the documentation at:

https://cdn.donately.com/dntly-components/2.3/docs/

Individual component docs:

  • /docs/campaign-list.html
  • /docs/campaign-details.html
  • /docs/fundraiser-list.html
  • /docs/fundraiser-details.html
  • /docs/donation-list.html
  • /docs/account-details.html