UAsset
Motion icon · Free

Train icon — animated SVG

A free train motion icon that acts out its meaning. The animation is pure CSS inside the SVG, so it works in any website or app without Lottie or JavaScript. 24px grid, 2px stroke, round caps. Free for personal and commercial use.

Open in UAsset

Hover SVG code (plays when hovered)

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="uah-train" overflow="visible"><style>.uah-train g.uam,.uah-train [class^=p]{transform-box:fill-box;transform-origin:center}:is(.uah-train:hover,:hover>.uah-train,:focus-visible>.uah-train) g.uam{animation:uaLdrive 0.80s cubic-bezier(.65,0,.35,1) 0s 1 both}@keyframes uaLdrive{0%,100%{transform:none}25%{transform:translateX(-1.4px)}55%{transform:translateX(3px) translateY(-.6px)}80%{transform:translateX(-.4px)}}@media (prefers-reduced-motion:reduce){.uah-train *{animation:none!important}}</style><g class="uam"><rect pathLength="1" x="5" y="3" width="14" height="14" rx="3"/><path pathLength="1" d="M5 10h14M12 3v7M8 21l2-4M16 21l-2-4M9 13.5h.01M15 13.5h.01"/></g></svg>

Looping SVG code

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="ual-train" overflow="visible"><style>.ual-train g.uam,.ual-train [class^=p]{transform-box:fill-box;transform-origin:center}.ual-train g.uam{animation:uaLdriveL 2.08s cubic-bezier(.65,0,.35,1) 0s infinite}@keyframes uaLdriveL{0.0%,38.0%{transform:none}9.5%{transform:translateX(-1.4px)}20.9%{transform:translateX(3px) translateY(-.6px)}30.4%{transform:translateX(-.4px)}}@media (prefers-reduced-motion:reduce){.ual-train *{animation:none!important}}</style><g class="uam"><rect pathLength="1" x="5" y="3" width="14" height="14" rx="3"/><path pathLength="1" d="M5 10h14M12 3v7M8 21l2-4M16 21l-2-4M9 13.5h.01M15 13.5h.01"/></g></svg>

Static SVG code

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect pathLength="1" x="5" y="3" width="14" height="14" rx="3"/><path pathLength="1" d="M5 10h14M12 3v7M8 21l2-4M16 21l-2-4M9 13.5h.01M15 13.5h.01"/></svg>

Tags: line, outline, stroke, train, transport

More Transport motion icons

CarBikeBusPlaneShipAnchorFuelRouteSignpostParkingTraffic LightCarBikeBusTrainPlaneShipAnchorFuelRouteSignpostParkingTraffic LightCar

Browse categories