Skip to content

pastetaste

Solar Day Simulator

DataInteraction

A sizing tool that dispatches a solar array and battery against a site's hourly load: pick a site type, drag array and battery size, and the day chart, self-use share, grid import, export and backup hours update live.

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/solar-day-simulator.tsx.

npx shadcn@latest add https://pastetaste.com/r/solar-day-simulator.json

Prompt

Install the pastetaste component "Solar Day Simulator" (solar-day-simulator) into this Next.js project and use it.

What it is: A sizing tool that dispatches a solar array and battery against a site's hourly load: pick a site type, drag array and battery size, and the day chart, self-use share, grid import, export and backup hours update live.

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/solar-day-simulator.json
   (it writes components/pastetaste/solar-day-simulator.tsx; install any npm packages it reports).
2. Import it: import { SolarDaySimulator } from "@/components/pastetaste/solar-day-simulator" (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):
- profiles: SiteProfile[] = dairy, cold store, brewhouse, mill — Site types with a peak kW and an hourly shape function (0 to 1).
- array / battery: number = 70 / 240 — Initial solar array (kW) and battery (kWh).
- arrayRange / batteryRange: [min, max, step] = [30,400,10] / [0,1200,60] — Slider limits.
- colors: { solar, load, charge } = amber, ink, blue — Line colours.
- className / style: string / CSSProperties — On the outer element.

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

Props 5

PropTypeDefaultDescription
profilesSiteProfile[]dairy, cold store, brewhouse, millSite types with a peak kW and an hourly shape function (0 to 1).
array / batterynumber70 / 240Initial solar array (kW) and battery (kWh).
arrayRange / batteryRange[min, max, step][30,400,10] / [0,1200,60]Slider limits.
colors{ solar, load, charge }amber, ink, blueLine colours.
className / stylestring / CSSProperties-On the outer element.
View all →