Ballmac UI home

Donations 1: donation page

A donation page for a charity: what each amount does, once or every month, which cause, an optional card-fee cover, anonymous giving, a progress bar to the goal, and a thank you that says exactly what was given.

State

The normal view. Pick a state to see what the block shows while it loads, is empty or fails.

Open in v0 (opens in a new tab)

Installation

$ pnpm dlx shadcn@latest add @ballmac/donations-1

Usage

Example: donations-1-demo.tsx
"use client"

import { Donations1 } from "@/components/ballmac/blocks/donations-1/donations-1"

export default function Donations1Demo() {
  return <Donations1 />
}

States

Pass state and the block does the rest: skeletons that match its layout, a clear empty message, an error you can retry, and announcements for screen readers.

  • Loading

    Skeleton progress and form under the real heading, announced as loading.

    state="loading"
  • Giving is not open yet

    Says giving is not open yet; emptyState sets the copy.

    state="empty"
  • Could not load

    An alert saying you were not charged, with Try again (onRetry). A gift that fails keeps the form filled and says why.

    state="error"

Dependencies

Use with AI

Donation page. <Donations1 presets={[{ amount, impact }]} causes={[{ id, name, detail }]} raised goal donors currency='USD' feeRate={0.03} onDonate={({ amount, cause, monthly, coverFees, name, email, anonymous }) => Promise} />. The total, including the fee cover, is always shown before the button. Giving anonymously removes the name requirement and sends no name. With the shadcn MCP server set up (guide), ask your agent:

Add the Ballmac UI Donations 1: donation page (@ballmac/donations-1) to this project with the shadcn MCP, then use it where it fits.

Use it for

  • A charity or open source project asking for gifts
  • Any pay-what-you-choose page with a clear impact

Not for

  • A store checkout; use billing-1
  • A fixed plan subscription; use pricing-1

Registry JSON: https://ui.ballmac.com/r/donations-1.json

Free to use in personal and commercial projects.

Ballmac UI Pro

Need the whole screen, not one piece?

150 premium blocks (dashboards, settings, calendars, mail, shops, onboarding), a private shadcn registry and Figma tokens. Blocks that show data come with loading, empty and error states built in.

Not ready? Try three Pro blocks free

Leave your email and the blocks appear right here, ready to copy. Yours to use in any project.