Skip to content

pastetaste

Payback Sizer

DataFormsInteraction

A sizing and payback calculator: pick a site, set the number of units and the electricity rate, and see payback years, a bar against ten years and an itemised cost, credit, savings and ten-year net sheet.

Paste it into Claude Code: it installs the component, asks for your brand and content, and places it on the page you name.

Install

Or by hand, in a Next.js project with shadcn set up. It writes components/pastetaste/payback-sizer.tsx.

npx shadcn@latest add https://pastetaste.com/r/payback-sizer.json

Prompt

Install the pastetaste component "Payback Sizer" (payback-sizer) into this Next.js project and use it.

What it is: A sizing and payback calculator: pick a site, set the number of units and the electricity rate, and see payback years, a bar against ten years and an itemised cost, credit, savings and ten-year net sheet.

Before you place it, ask me (one short message, in my language; "skip" = sensible default): which page and section it goes in, my brand colour (hex), the text, labels or images it should show, and whether I want my logo or my own copy in the demo content. Then:

Steps:
1. If the project has no components.json, run: npx shadcn@latest init -y -d. Then run: npx shadcn@latest add https://pastetaste.com/r/payback-sizer.json
   (it writes components/pastetaste/payback-sizer.tsx; install any npm packages it reports).
2. Import it: import { PaybackSizer } from "@/components/pastetaste/payback-sizer" (check the file for the exact named export).
3. Put it where it fits on the page I name, keep the rest of the page untouched, and pass props for my colours instead of editing the installed file.
4. It does not depend on Tailwind; colours come from CSS variables (--pt-*) or props.
5. It supports prefers-reduced-motion with a still state; do not remove it.

Props (all optional unless the type has no default):
- sites: { name, units, rate }[] = 5 farm and mill sites — Searchable presets; picking one sets the unit count and the rate.
- unitLabel / unitName: string = Cabinets / H-120 — Slider label and model code.
- unitMin / unitMax: number = 1 / 20 — Slider range.
- unitCost / unitKwh / unitKw: number = 38400 / 120 / 60 — Installed cost, energy and power of one unit.
- cyclesPerYear / spreadShare / demandPerKwMonth: number = 280 / 0.6 / 6 — Savings model: cycles shifted a year, share earning the full spread, demand charge per kW and month.
- creditShare / tenYearYield: number = 0.3 / 0.96 — Tax credit as a share of cost; output kept after ten years.
- rates / currency: number[] / string = 8 rates / $ — Select options and currency symbol.
- ctaLabel / onCta / note: string / () => void / string — Outline pill button, its handler, and the footnote.

Live preview: https://pastetaste.com/c/payback-sizer
Then run the dev server, check it in the browser at desktop and mobile width, and tell me the page URL.

Props 8

PropTypeDefaultDescription
sites{ name, units, rate }[]5 farm and mill sitesSearchable presets; picking one sets the unit count and the rate.
unitLabel / unitNamestringCabinets / H-120Slider label and model code.
unitMin / unitMaxnumber1 / 20Slider range.
unitCost / unitKwh / unitKwnumber38400 / 120 / 60Installed cost, energy and power of one unit.
cyclesPerYear / spreadShare / demandPerKwMonthnumber280 / 0.6 / 6Savings model: cycles shifted a year, share earning the full spread, demand charge per kW and month.
creditShare / tenYearYieldnumber0.3 / 0.96Tax credit as a share of cost; output kept after ten years.
rates / currencynumber[] / string8 rates / $Select options and currency symbol.
ctaLabel / onCta / notestring / () => void / string-Outline pill button, its handler, and the footnote.
View all →