terra vidhal

Solar Configurator

Component

About

A solar configurator with a clickable roof panel grid, panel and battery options, installation toggle, live system size, savings, payback, offset and a monthly production chart.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Solar Configurator to your project and fits it to your theme.

Code

How Solar Configurator is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

"use client";

/**
 * PrequelUI Animate — MIT — https://prequeluianimate.terravidhal.me
 */

import {
  SolarConfigurator,
  type SolarBatteryOption,
  type SolarPanelOption,
} from "@/components/ui/solar-configurator";

const PANELS: SolarPanelOption[] = [
  { id: "standard", name: "Standard panel", wattage: 420, price: 310 },
  { id: "high", name: "High-yield panel", wattage: 460, price: 390 },
  { id: "compact", name: "Compact panel", wattage: 380, price: 270 },
];

const BATTERIES: SolarBatteryOption[] = [
  { id: "none", name: "No battery", capacity: 0, price: 0 },
  { id: "small", name: "Home battery", capacity: 10, price: 6200 },
  { id: "large", name: "Home battery plus", capacity: 15, price: 8400 },
];

export default function SolarConfiguratorDemo() {
  return (
    <main className="flex min-h-screen w-full items-start justify-center bg-gradient-to-b from-muted/40 via-background to-background px-4 py-8 sm:px-6">
      <SolarConfigurator
        panels={PANELS}
        batteries={BATTERIES}
        tariff={0.24}
        sunHours={4.2}
        annualUsage={7800}
        installationCost={1800}
        title="Home solar design"
      />
    </main>
  );
}

Dependencies

More by terra vidhal

View all
  • Project Timeline

    Project Timeline

    30
  • Kanban Board

    Kanban Board

    20
  • Gravity Stars Background

    Gravity Stars Background

    20
  • Booking Calendar

    Booking Calendar

    18
  • Notification Center

    Notification Center

    16
  • Audio Waveform

    Audio Waveform

    16
  • Kpi Counter

    Kpi Counter

    16
  • Topographic Lines

    Topographic Lines

    16

Explore more

Part of PrequelUI Animate — browse the full library on 21st.dev.