train from Keyline Icons by Keyline Icons · Stroke · MIT Free for personal and commercial use.

Name
train
Set
Keyline Icons
Style
Stroke
Viewbox
24×24
License
MIT

7 other variants in Keyline Icons

The same icon in other sets

Use the train icon

SVG

<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><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"/><path fill="currentColor" 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" stroke="none"/></g></svg>

React

import type { SVGProps } from "react";

export function KeylineIconsTrain(props: SVGProps<SVGSVGElement>) {
  return (
    <svg {...props} xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2"><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"/><path fill="currentColor" 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" stroke="none"/></g></svg>
  );
}

Vue

<template>
  <svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><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"/><path fill="currentColor" 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" stroke="none"/></g></svg>
</template>

CSS

.icon-train {
  width: 24px;
  height: 24px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%221em%22%20height%3D%221em%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20stroke-width%3D%222%22%3E%3Cpath%20d%3D%22M7%202L17%202C18.6569%202%2020%203.3431%2020%205L20%2015C20%2016.6569%2018.6569%2018%2017%2018L7%2018C5.3431%2018%204%2016.6569%204%2015L4%205C4%203.3431%205.3431%202%207%202ZM4%209L20%209M4%205L2%205M20%205L22%205M7%2018L5%2022M17%2018L19%2022%22%2F%3E%3Cpath%20fill%3D%22currentColor%22%20d%3D%22M10%2013.5C10%2014.3284%209.3284%2015%208.5%2015C7.6716%2015%207%2014.3284%207%2013.5C7%2012.6716%207.6716%2012%208.5%2012C9.3284%2012%2010%2012.6716%2010%2013.5ZM17%2013.5C17%2014.3284%2016.3284%2015%2015.5%2015C14.6716%2015%2014%2014.3284%2014%2013.5C14%2012.6716%2014.6716%2012%2015.5%2012C16.3284%2012%2017%2012.6716%2017%2013.5Z%22%20stroke%3D%22none%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%221em%22%20height%3D%221em%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20stroke-width%3D%222%22%3E%3Cpath%20d%3D%22M7%202L17%202C18.6569%202%2020%203.3431%2020%205L20%2015C20%2016.6569%2018.6569%2018%2017%2018L7%2018C5.3431%2018%204%2016.6569%204%2015L4%205C4%203.3431%205.3431%202%207%202ZM4%209L20%209M4%205L2%205M20%205L22%205M7%2018L5%2022M17%2018L19%2022%22%2F%3E%3Cpath%20fill%3D%22currentColor%22%20d%3D%22M10%2013.5C10%2014.3284%209.3284%2015%208.5%2015C7.6716%2015%207%2014.3284%207%2013.5C7%2012.6716%207.6716%2012%208.5%2012C9.3284%2012%2010%2012.6716%2010%2013.5ZM17%2013.5C17%2014.3284%2016.3284%2015%2015.5%2015C14.6716%2015%2014%2014.3284%2014%2013.5C14%2012.6716%2014.6716%2012%2015.5%2012C16.3284%2012%2017%2012.6716%2017%2013.5Z%22%20stroke%3D%22none%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E") no-repeat center / contain;
}

Direct links: SVG · download · JSON · https://iconsdb.app/api/v1/icon/keyline-icons/train.svg?color=%231a73e8&size=48