# Affiliate Page

> A React affiliate program page template: a commission hero, an earnings calculator, tiers, partner quotes, an application form and FAQ.

- Type: React template (Templates)
- Access: Pro (the source needs a Wingo UI Pro plan, see https://wingo-ui.com/pricing)
- Version: 1.1.0
- Install: `npx wingo-ui@latest add affiliate-page`
- Docs: https://wingo-ui.com/templates/affiliate-page

## Interaction

Apply now and How it works jump down the page; the announcement pill jumps to the tiers. The hero shows a partner dashboard drawn in code. In the calculator, drag the slider (or use the arrow keys) for the number of teams you refer each month and pick what your audience mostly buys: the monthly commission after a year and the first-year total roll to their new values in USD, with the per-customer amount under them. The tiers (Partner, Pro Partner, Elite: commission, cookie window, what it takes and perks) are a table from 768px and one card per tier on phones. The application form checks name, email, a website or channel link, the audience size and at least 20 characters on how you would promote Acme; errors show under each field and focus jumps to the first one. Send application spins while it sends, then the form turns into a confirmation with Send another application. The FAQ opens one answer at a time.

## Installation

```bash
npx wingo-ui@latest add affiliate-page
```

Pro item: run `npx wingo-ui@latest login` once with a Pro account. The CLI adds the files, their dependencies and a version record for updates.

With shadcn: `npx shadcn@latest add @wingo-ui/affiliate-page` (needs the @wingo-ui registry with your API key in components.json)

Files:

- `components/templates/affiliate-page.tsx`
- `components/templates/affiliate-page-data.ts`

npm dependencies: `npm i motion lucide-react`

Wingo UI dependencies (installed automatically):

- [CTA Section](https://wingo-ui.com/components/cta-section) ([Markdown](https://wingo-ui.com/components/cta-section.md))
- [FAQ Section](https://wingo-ui.com/components/faq-section) ([Markdown](https://wingo-ui.com/components/faq-section.md))
- [Hero Section](https://wingo-ui.com/components/hero-section) ([Markdown](https://wingo-ui.com/components/hero-section.md))
- [Marketing Footer](https://wingo-ui.com/components/marketing-footer) ([Markdown](https://wingo-ui.com/components/marketing-footer.md))
- [Marketing Header](https://wingo-ui.com/components/marketing-header) ([Markdown](https://wingo-ui.com/components/marketing-header.md))
- [Marketing Section](https://wingo-ui.com/components/marketing-section) ([Markdown](https://wingo-ui.com/components/marketing-section.md))
- [Stats Section](https://wingo-ui.com/components/stats-section) ([Markdown](https://wingo-ui.com/components/stats-section.md))
- [Testimonials Section](https://wingo-ui.com/components/testimonials-section) ([Markdown](https://wingo-ui.com/components/testimonials-section.md))
- [Animated Counter](https://wingo-ui.com/components/animated-counter) ([Markdown](https://wingo-ui.com/components/animated-counter.md))
- [Button](https://wingo-ui.com/components/button) ([Markdown](https://wingo-ui.com/components/button.md))
- [Input](https://wingo-ui.com/components/input) ([Markdown](https://wingo-ui.com/components/input.md))
- [Select](https://wingo-ui.com/components/select) ([Markdown](https://wingo-ui.com/components/select.md))
- [Slider](https://wingo-ui.com/components/slider) ([Markdown](https://wingo-ui.com/components/slider.md))
- [Textarea](https://wingo-ui.com/components/textarea) ([Markdown](https://wingo-ui.com/components/textarea.md))
- [Motion presets](https://wingo-ui.com/components/motion) ([Markdown](https://wingo-ui.com/components/motion.md))
- [Navigation](https://wingo-ui.com/components/navigation) ([Markdown](https://wingo-ui.com/components/navigation.md))
- [Tones](https://wingo-ui.com/components/tones) ([Markdown](https://wingo-ui.com/components/tones.md))
- [UIProvider](https://wingo-ui.com/components/ui-config) ([Markdown](https://wingo-ui.com/components/ui-config.md))

## Usage

```tsx
// app/(marketing)/partners/page.tsx
"use client"

import Link from "next/link"
import { AffiliatePage } from "@/components/templates/affiliate-page"

export default function PartnersRoute() {
  return (
    <AffiliatePage
      linkComponent={Link}
      onApply={async (application) => {
        const res = await fetch("/api/partners/apply", { method: "POST", body: JSON.stringify(application) })
        if (!res.ok) throw new Error("Application failed")
      }}
    />
  )
}
```

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `planMixes?` | `AffiliatePlanMix[]` | `"AFFILIATE_PLAN_MIXES"` | The calculator's plan options: { value, label, description, monthlyBill }. |
| `steps?` | `AffiliateStep[]` | `"AFFILIATE_STEPS"` | How it works: { icon, title, description }. |
| `tiers?` | `AffiliateTier[]` | `"AFFILIATE_TIERS"` | Commission tiers: { id, name, rate, cookieDays, requirement, perks, highlight? }. |
| `testimonials?` | `AffiliateQuote[]` | `"AFFILIATE_QUOTES"` | Partner quotes: { quote, name, role, company, metric? }. |
| `faq?` | `AffiliateFaq[]` | `"AFFILIATE_FAQ"` | { question, answer } pairs. |
| `audienceSizes?` | `AffiliateOption[]` | `"AFFILIATE_AUDIENCE_SIZES"` | The audience size options of the form. |
| `stats?` | `StatsSectionItem[]` | `"AFFILIATE_STATS"` | The bold design's numbers band: { value, decimals?, prefix?, suffix?, label }. |
| `labels?` | `Partial<AffiliatePageLabels>` | `"DEFAULT_AFFILIATE_PAGE_LABELS"` | Every visible string, the form errors included. |
| `rate?` | `number` | `0.3` | The commission the calculator uses (0.3 = 30%). |
| `defaultReferrals?` | `number` | `5` | Teams referred per month the calculator starts on. |
| `defaultPlanMix?` | `string` | `"mixed"` | The plan mix the calculator starts on. |
| `maxReferrals?` | `number` | `50` | The end of the referrals slider. |
| `design?` | `"classic" \| "bold"` | `"classic"` | The whole page's look. classic follows the layout props; bold: a soft page with gradient bands, a pill header, a magazine size title on a gradient mesh with the dashboard under it, an inverted numbers band, the earnings on an inverted panel, solid step icons with big numbers, rounder tier and form cards, a featured quote, FAQ cards, a closing card that emails the partner kit and a wordmark footer. headerProps and footerProps still win. |
| `heroLayout?` | `"split" \| "centered" \| "stacked"` | `"split"` | split: copy left, dashboard right; centered and stacked put the dashboard under the copy. Applies to the classic design. |
| `showDashboard?` | `boolean` | `true` | The drawn partner dashboard in the hero. |
| `showCalculator?` | `boolean` | `true` | The earnings calculator. |
| `showSteps?` | `boolean` | `true` | The How it works steps from sign up to payout. |
| `showTiers?` | `boolean` | `true` | The commission tiers. |
| `showTestimonials?` | `boolean` | `true` | Partner quotes. |
| `showFaq?` | `boolean` | `true` | The program FAQ. |
| `showCta?` | `boolean` | `true` | The closing call to action. |
| `ctaVariant?` | `"inverted" \| "soft" \| "split" \| "plain"` | `"inverted"` | The look of the closing call to action. Applies to the classic design. |
| `header?` | `boolean` | `true` | The sticky marketing header; turn it off when the page sits in a site layout. |
| `footer?` | `boolean` | `true` | The marketing footer. |
| `headerProps?` | `Partial<MarketingHeaderProps>` |  | Passed to MarketingHeader (announcement, ctaTone, items...). |
| `footerProps?` | `Partial<MarketingFooterProps>` |  | Passed to MarketingFooter. |
| `onApply?` | `(application: AffiliateApplication) => (void \| Promise<unknown>)` |  | Sends the application { name, email, website, audience, promotion }; a returned promise keeps the button loading and a rejection shows an error. Without it the form waits 900 ms and succeeds. |
| `onSubscribe?` | `(email: string) => (void \| Promise<unknown>)` |  | Sends the partner kit from the bold design's closing card; a rejected promise shows an error. Without it the form waits 900 ms and succeeds. |
| `tone?` | `"neutral" \| "brand" \| "success" \| "warning" \| "danger" \| "info"` | `"neutral"` | The page tint (unless backgroundColor is set), the slider, step tiles, the yearly figure, the popular tier badge and FAQ accents. |
| `ctaTone?` | `"neutral" \| "brand" \| "success" \| "warning" \| "danger" \| "info"` | `"neutral"` | The primary buttons of the hero, the form and the closing band. |
| `background?` | `"plain" \| "soft" \| "glow" \| "aurora" \| "grid" \| "dots"` | `"glow"` | The main background: plain is the bare page color; the others tint the page and add a glow, an aurora, a grid or dots over the first screen. A design picks its own unless you set one. |
| `backgroundColor?` | `string` | `"oklch(0.62 0.14 275)"` | The tint and glow color of the main background; follows tone when tone is not neutral. |
| `bandBackground?` | `"muted" \| "tinted" \| "gradient" \| "dots"` | `"muted"` | The secondary background of the alternating bands. Cards, fields and tiles inside a band are lifted one step above it, so they never share its color. |
| `bandColor?` | `string` | `"oklch(0.62 0.14 275)"` | The tint of tinted and gradient bands; defaults to backgroundColor. |
| `animateIn?` | `boolean` | `true` | The hero rises in once on mount; off in thumbnails and under reduced motion. |
| `locale?` | `string` | `"en-US"` | Intl locale for the amounts (always USD) and percentages. |
| `linkComponent?` | `(props: LinkComponentProps) => ReactNode` | `"<a>"` | The router link for every link (next/link in an app); default the LinkProvider's. |
| `className?` | `string` |  | Classes for the root. |
| `classNames?` | `Partial<Record<AffiliatePageSlot, string>>` |  | Classes for hero, stats, calculator, steps, tiers, testimonials, apply, form, faq and cta. |

## Parts

### AffiliateCalculator (component)

The earnings calculator on its own: a referrals slider, a plan mix select and the animated monthly and first-year commission. Takes div props.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `planMixes?` | `AffiliatePlanMix[]` | `"AFFILIATE_PLAN_MIXES"` | The plan options. |
| `defaultReferrals?` | `number` | `5` | Where the slider starts. |
| `defaultPlanMix?` | `string` | `"mixed"` | The plan mix it starts on. |
| `rate?` | `number` | `0.3` | The commission rate. |
| `maxReferrals?` | `number` | `50` | The end of the slider. |
| `tone?` | `Tone` | `"neutral"` | The slider and the yearly figure. |
| `classNames?` | `Partial<Record<"controls" \| "results", string>>` |  | Classes for the slider column and the results panel. |
| `locale?` | `string` | `"en-US"` | Number format. |
| `labels?` | `Partial<AffiliatePageLabels>` |  | The strings. |

### AffiliateTiers (component)

The tiers as a table from 768px and one card per tier on phones. Takes div props.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `tiers?` | `AffiliateTier[]` | `"AFFILIATE_TIERS"` | The tiers. |
| `tone?` | `Tone` | `"neutral"` | The popular badge. |
| `locale?` | `string` | `"en-US"` | Percent format. |
| `labels?` | `Partial<AffiliatePageLabels>` |  | The strings. |

### AffiliateApplyForm (component)

The validated application form with loading and an inline confirmation. Takes div props.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `audienceSizes?` | `AffiliateOption[]` | `"AFFILIATE_AUDIENCE_SIZES"` | The audience size options. |
| `onApply?` | `(application: AffiliateApplication) => (void \| Promise<unknown>)` |  | Sends the application. |
| `tone?` | `Tone` | `"neutral"` | The submit button. |
| `labels?` | `Partial<AffiliatePageLabels>` |  | The strings. |

### affiliateEarnings (function)

affiliateEarnings(referralsPerMonth, monthlyBill, rate) returns { perCustomer, monthly, yearly }: the commission at month 12 and the total over the first 12 months.

### AFFILIATE_PLAN_MIXES (constant)

Mostly Pro ($144 a month), a mix ($252) and mostly Business ($360).

### AFFILIATE_STEPS (constant)

Apply, share your link, get paid.

### AFFILIATE_TIERS (constant)

Partner 30%, Pro Partner 35% and Elite 40%.

### AFFILIATE_STATS (constant)

1,800+ partners, $2.4M paid out, a 40% top rate and 12 months of commission.

### AFFILIATE_PAGE_DESIGNS (constant)

The design names, classic first: ["classic", "bold"].

### AffiliatePageDesign (type)

The design prop's values: "classic" | "bold".

### AFFILIATE_QUOTES (constant)

Three partner quotes with earnings metrics.

### AFFILIATE_FAQ (constant)

Five program questions.

### AFFILIATE_AUDIENCE_SIZES (constant)

Four audience size ranges.

### DEFAULT_AFFILIATE_PAGE_LABELS (constant)

The English strings.

### AffiliateApplication (type)

{ name, email, website, audience, promotion }.

### AffiliatePlanMix (type)

{ value, label, description, monthlyBill }.

### AffiliateTier (type)

{ id, name, rate, cookieDays, requirement, perks, highlight? }.

### AffiliateStep (type)

{ icon, title, description }.

### AffiliateQuote (type)

{ quote, name, role, company, metric? }.

### AffiliateFaq (type)

{ question, answer }.

### AffiliateOption (type)

A select option in the application form: { value, label }.

### AffiliatePageProps (type)

Props of AffiliatePage.

## Examples

- **Bold design**: design="bold": huge type on a gradient mesh, a numbers band, an inverted earnings panel, big step numbers and a partner kit form.
- **Brand tone**: The marketing orange on the slider, step tiles, the yearly figure and every primary button.
- **Big audience, Business teams**: The calculator starts at 30 teams a month, mostly on Business, with a slider up to 100.
- **Centered hero, short page**: The dashboard under the copy, without testimonials or FAQ, and a soft closing band.
- **Application that fails**: onApply rejects, so the form shows its error and keeps what was typed.

## See also

- [Pricing Page](https://wingo-ui.com/components/pricing-page) ([Markdown](https://wingo-ui.com/components/pricing-page.md))
- [Slider](https://wingo-ui.com/components/slider) ([Markdown](https://wingo-ui.com/components/slider.md))
- [Animated Counter](https://wingo-ui.com/components/animated-counter) ([Markdown](https://wingo-ui.com/components/animated-counter.md))
- [Testimonials Section](https://wingo-ui.com/components/testimonials-section) ([Markdown](https://wingo-ui.com/components/testimonials-section.md))
- [FAQ Section](https://wingo-ui.com/components/faq-section) ([Markdown](https://wingo-ui.com/components/faq-section.md))

---

Canonical: https://wingo-ui.com/templates/affiliate-page
More components: https://wingo-ui.com/components · Index for agents: https://wingo-ui.com/llms.txt
