About
A route optimizer with a coordinate map, animated route path, stop sequence with keyboard reordering, per-leg distances, shortest-path or priority-first optimisation, distance and time statistics and publish or reset actions.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Route Optimizer to your project and fits it to your theme.
Code
How Route Optimizer 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 { RouteOptimizer, type RouteStop } from "@/components/ui/route-optimizer";
const STOPS: RouteStop[] = [
{ id: "s1", label: "North gate pickup", zone: "North loop", service: 12, priority: "high", x: 26, y: 18 },
{ id: "s2", label: "Retail loop drop", zone: "East loop", service: 18, priority: "normal", x: 78, y: 24 },
{ id: "s3", label: "Depot B transfer", zone: "Depot B", service: 25, priority: "normal", x: 66, y: 58 },
{ id: "s4", label: "Zone 3 parcel stop", zone: "Zone 3", service: 8, priority: "low", x: 42, y: 76 },
{ id: "s5", label: "Clinic delivery", zone: "Zone 1", service: 10, priority: "high", x: 18, y: 62 },
{ id: "s6", label: "Evening collection", zone: "South loop", service: 15, priority: "normal", x: 62, y: 88 },
];
export default function RouteOptimizerDemo() {
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">
<RouteOptimizer
depot={{ label: "Depot A", x: 8, y: 48 }}
stops={STOPS}
title="Afternoon delivery route"
/>
</main>
);
}








