gentleface

Gentleface › Transportation › train

train icon

Train: train, railway, metro, rail. Drawn on the 16 px grid. Free SVG, PNG and code, MIT licensed.

Animated train-roll · line-round

The headlights come on and the sleepers rush out from under the train along rails that stretch to the edge. The carriage rocks on the track and jolts at every rail joint.

Download SVG

Native SVG animation, with no CSS or script. It loops by itself. Inline it to take the text color: in an <img> it draws black. To play it once on hover or click, run 0.25 s to 3 s. Examples and helper.

Code line-round

SVG
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M12.414 12.414C12.219 12.609 11.993 12.758 11.736 12.86C11.5 12.953 11.254 13 11 13L10.707 13L11.854 14.146C11.953 14.246 12.003 14.364 12.003 14.5C12.003 14.636 11.953 14.754 11.854 14.854C11.754 14.953 11.636 15.003 11.5 15.003C11.364 15.003 11.246 14.953 11.146 14.854L9.293 13L5.707 13L3.854 14.854C3.756 14.951 3.638 15 3.5 15C3.362 15 3.244 14.951 3.146 14.854C3.047 14.754 2.997 14.636 2.997 14.5C2.997 14.364 3.047 14.246 3.146 14.146L4.293 13L4 13C3.746 13 3.5 12.953 3.264 12.86C3.007 12.758 2.781 12.609 2.586 12.414C2.391 12.219 2.242 11.993 2.14 11.736C2.047 11.5 2 11.254 2 11L2 3C2 2.746 2.047 2.5 2.14 2.264C2.242 2.007 2.391 1.781 2.586 1.586C2.781 1.391 3.007 1.242 3.264 1.14C3.5 1.047 3.746 1 4 1L11 1C11.254 1 11.5 1.047 11.736 1.14C11.993 1.242 12.219 1.391 12.414 1.586C12.609 1.781 12.758 2.007 12.86 2.264C12.953 2.5 13 2.746 13 3L13 11C13 11.254 12.953 11.5 12.86 11.736C12.758 11.993 12.609 12.219 12.414 12.414ZM7 6L7 2L4 2C3.724 2 3.488 2.098 3.293 2.293C3.098 2.488 3 2.724 3 3L3 6L7 6ZM12 3C12 2.724 11.902 2.488 11.707 2.293C11.512 2.098 11.276 2 11 2L8 2L8 6L12 6L12 3ZM12 11L12 7L3 7L3 11C3 11.276 3.098 11.512 3.293 11.707C3.488 11.902 3.724 12 4 12L11 12C11.276 12 11.512 11.902 11.707 11.707C11.902 11.512 12 11.276 12 11ZM5.707 9.293C5.902 9.488 6 9.724 6 10C6 10.276 5.902 10.512 5.707 10.707C5.512 10.902 5.276 11 5 11C4.724 11 4.488 10.902 4.293 10.707C4.098 10.512 4 10.276 4 10C4 9.724 4.098 9.488 4.293 9.293C4.488 9.098 4.724 9 5 9C5.276 9 5.512 9.098 5.707 9.293ZM9.293 9.293C9.488 9.098 9.724 9 10 9C10.276 9 10.512 9.098 10.707 9.293C10.902 9.488 11 9.724 11 10C11 10.276 10.902 10.512 10.707 10.707C10.512 10.902 10.276 11 10 11C9.724 11 9.488 10.902 9.293 10.707C9.098 10.512 9 10.276 9 10C9 9.724 9.098 9.488 9.293 9.293Z"/></svg>
React
// Gentleface "train" (line-round), MIT. https://gentleface.com/icons/train
import type { SVGProps } from 'react';

export function TrainIcon(props: SVGProps<SVGSVGElement>) {
  return (
    <svg xmlns="http://www.w3.org/2000/svg" width={16} height={16} viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" {...props}>
      <path d="M12.414 12.414C12.219 12.609 11.993 12.758 11.736 12.86C11.5 12.953 11.254 13 11 13L10.707 13L11.854 14.146C11.953 14.246 12.003 14.364 12.003 14.5C12.003 14.636 11.953 14.754 11.854 14.854C11.754 14.953 11.636 15.003 11.5 15.003C11.364 15.003 11.246 14.953 11.146 14.854L9.293 13L5.707 13L3.854 14.854C3.756 14.951 3.638 15 3.5 15C3.362 15 3.244 14.951 3.146 14.854C3.047 14.754 2.997 14.636 2.997 14.5C2.997 14.364 3.047 14.246 3.146 14.146L4.293 13L4 13C3.746 13 3.5 12.953 3.264 12.86C3.007 12.758 2.781 12.609 2.586 12.414C2.391 12.219 2.242 11.993 2.14 11.736C2.047 11.5 2 11.254 2 11L2 3C2 2.746 2.047 2.5 2.14 2.264C2.242 2.007 2.391 1.781 2.586 1.586C2.781 1.391 3.007 1.242 3.264 1.14C3.5 1.047 3.746 1 4 1L11 1C11.254 1 11.5 1.047 11.736 1.14C11.993 1.242 12.219 1.391 12.414 1.586C12.609 1.781 12.758 2.007 12.86 2.264C12.953 2.5 13 2.746 13 3L13 11C13 11.254 12.953 11.5 12.86 11.736C12.758 11.993 12.609 12.219 12.414 12.414ZM7 6L7 2L4 2C3.724 2 3.488 2.098 3.293 2.293C3.098 2.488 3 2.724 3 3L3 6L7 6ZM12 3C12 2.724 11.902 2.488 11.707 2.293C11.512 2.098 11.276 2 11 2L8 2L8 6L12 6L12 3ZM12 11L12 7L3 7L3 11C3 11.276 3.098 11.512 3.293 11.707C3.488 11.902 3.724 12 4 12L11 12C11.276 12 11.512 11.902 11.707 11.707C11.902 11.512 12 11.276 12 11ZM5.707 9.293C5.902 9.488 6 9.724 6 10C6 10.276 5.902 10.512 5.707 10.707C5.512 10.902 5.276 11 5 11C4.724 11 4.488 10.902 4.293 10.707C4.098 10.512 4 10.276 4 10C4 9.724 4.098 9.488 4.293 9.293C4.488 9.098 4.724 9 5 9C5.276 9 5.512 9.098 5.707 9.293ZM9.293 9.293C9.488 9.098 9.724 9 10 9C10.276 9 10.512 9.098 10.707 9.293C10.902 9.488 11 9.724 11 10C11 10.276 10.902 10.512 10.707 10.707C10.512 10.902 10.276 11 10 11C9.724 11 9.488 10.902 9.293 10.707C9.098 10.512 9 10.276 9 10C9 9.724 9.098 9.488 9.293 9.293Z" />
    </svg>
  );
}
Vue
Vue: see /icons/train.md
Svelte
Svelte: see /icons/train.md
HTML img
HTML img: see /icons/train.md
CSS
CSS: see /icons/train.md
Data URL
Data URL: see /icons/train.md
Sprite
Sprite: see /icons/train.md
SwiftUI
SwiftUI: see /icons/train.md
Compose
Compose: see /icons/train.md
Android XML
Android XML: see /icons/train.md
Flutter
Flutter: see /icons/train.md

Each icon is drawn on the 16 px grid, and most also on the 20 and 24 px grids (at 24 in three weights: light 1 px, regular 1.5 px, bold 2 px). Show the drawing made for your size, or an exact multiple of it, on whole pixels: 16 for 16 and 32 px, 20 for 20 and 40, 24 for 24 and 48. A size in between or a fractional position blurs it. The code on each icon page is the 16 px drawing, an SVG with fill="currentColor"; the icon page's downloads follow its Grid switch, and npm has the 20 and 24 px drawings too. The snippets are decorative (aria-hidden). For an icon that carries meaning on its own, such as an icon-only button, label the button, or give the SVG role="img" and an aria-label. More in how to use.

With npm: import { TrainIcon } from '@gentleface/react'; (setup).

Meaning

Use it for
train, railway, metro, rail, railroad, train station, rail freight
Alternatives
Also fits
  • public transport: rail or a train journey
  • subway: the metro owner and rail in general
  • tram: a train or railway
Tags
train, railway, rail, metro, subway, tram, transit, station
Category
Transportation
Component name
TrainIcon
History
  • added
  • released in 0.1.0
  • 20 px redrawn, 24 px redrawn, 20 px drawn, 24 px drawn
Since
version 0.1.0

Family 3

More transportation icons

For agents

Metadata: /icons/train.json · Markdown: /icons/train.md · SVG: https://gentleface.com/svg/{style}/16/train.svg · PNG: https://gentleface.com/png/{style}/{16|32|48}/train.png