A train seen head-on with its lamps lit, for rail travel, stations and timetables. On a 24×24 grid in stroke, duotone and fill, free under MIT.
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M7 2L17 2C18.6569 2 20 3.3431 20 5L20 15C20 16.6569 18.6569 18 17 18L7 18C5.3431 18 4 16.6569 4 15L4 5C4 3.3431 5.3431 2 7 2ZM4 9L20 9M4 5L2 5M20 5L22 5M7 18L5 22M17 18L19 22" fill="none"/>
<path d="M10 13.5C10 14.3284 9.3284 15 8.5 15C7.6716 15 7 14.3284 7 13.5C7 12.6716 7.6716 12 8.5 12C9.3284 12 10 12.6716 10 13.5ZM17 13.5C17 14.3284 16.3284 15 15.5 15C14.6716 15 14 14.3284 14 13.5C14 12.6716 14.6716 12 15.5 12C16.3284 12 17 12.6716 17 13.5Z" fill="currentColor" stroke="none"/>
</svg>Also called
What someone searching for this drawing would have typed instead. These are the words the browser's search matches on.
- rail
- railway
- metro
- underground
- commute
- station
Related icons
The rest of the train family first, then the Transport shelf.
FAQ
Answered from train's own facts: its shelf, the weights it was drawn in, its siblings and its dates.
- What is the train icon for?
- A train seen head-on with its lamps lit, for rail travel, stations and timetables. It is filed under Transport in Keyline Icons, drawn on the same 24×24 grid as the rest of the set. People look for it as rail, railway, metro, underground, commute and station, and the browser's search matches all of those.
- What styles does the train icon come in?
- All three: stroke, duotone and fill. They are drawn from the same geometry, so swapping weight never moves anything.
- Is there a square or circle version of train?
- No. train is drawn as a bare glyph, and the set has no boxed variant of it.
- What other icons go with train?
- bike, plane, plane-landing, plane-takeoff and ship, all shown below. They are the Transport shelf: nothing else in the set is named after train.
- How do I import train in React?
- <Train /> is the component, and the weight decides the module: stroke from "@keyline-icons/react", duotone from "@keyline-icons/react/duotone" and fill from "@keyline-icons/react/fill". It takes the usual SVG props plus a size, so <Train size={16} /> and className="size-4" both work, and there is no provider or theme to set up.
- Where is the train SVG?
- icons/stroke/train.svg, icons/duotone/train.svg and icons/fill/train.svg in the repository, normalised: no wrapper, no ids and no classes to strip out. The tabs above hand you the same drawing as SVG or JSX without the download, and neither needs an install.
- When was train added to the set?
- Added 12 Sept 2026. It ships in v0.9.0, so an install at that version or later has it.
Questions about the set rather than about this drawing are answered where they belong. The home page covers what the set is, how the three styles differ, why some icons come boxed and where the Figma file is; installing the set in a shadcn/ui project covers the React package, the CLI and using an icon without React. The MIT licence is stated in the footer of every page.