About
An animated SVG diagram of an electric locomotive and its train that bends realistically along a curved track, with switchable camera views and a working pantograph.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Rail Locomotive to your project and fits it to your theme.
Code
How Rail Locomotive is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import { RailLocomotive } from "@/components/ui/rail-locomotive";
export default function RailLocomotiveDemo() {
return (
<div className="flex min-h-screen w-full items-center justify-center bg-background p-8">
<RailLocomotive behavior="line" cars={1} />
</div>
);
}








