ICONYZ
English
Train icon from Keyline Icons

Train icon

keyline-icons:train

The Train icon (keyline-icons:train) is a free SVG icon from the Keyline Icons set. It is drawn on a 24 × 24 grid. Keyline Icons are released under the MIT license, which allows use in personal and commercial projects. Copy it as SVG, JSX, Vue or Svelte code, or download the SVG file.

Icon set
Keyline Icons
Author
Keyline Icons
License
MIT
Size
24 × 24
Download SVG

SVG code

<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" 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>

How to use the Train icon

React

import { Icon } from "@iconify/react";

<Icon icon="keyline-icons:train" width="24" />

Vue

<script setup>
import { Icon } from "@iconify/vue";
</script>

<template>
  <Icon icon="keyline-icons:train" width="24" />
</template>

Svelte

<script>
  import Icon from "@iconify/svelte";
</script>

<Icon icon="keyline-icons:train" width="24" />

Tailwind CSS

<!-- @iconify/tailwind plugin -->
<span class="icon-[keyline-icons--train]"></span>

UnoCSS

<!-- @unocss/preset-icons + @iconify-json/keyline-icons -->
<div class="i-keyline-icons:train"></div>

Web component

<script src="https://code.iconify.design/iconify-icon/2.1.0/iconify-icon.min.js"></script>

<iconify-icon icon="keyline-icons:train"></iconify-icon>

HTML image

<img src="https://iconyz.com/api/public/svg/keyline-icons/train.svg" alt="Train icon" width="24" height="24">

Related icons in Keyline Icons

Train icon in other icon sets

Train icon FAQ

Is the Train icon free for commercial use?

Yes. Keyline Icons are released under the MIT license, which allows use in personal and commercial projects.

How do I use the Train icon in React?

Install @iconify/react and render <Icon icon="keyline-icons:train" />, or use “Copy code” on this page to get a standalone React component.

How do I add the Train icon to a web page?

Link the SVG file in an image tag: <img src="https://iconyz.com/api/public/svg/keyline-icons/train.svg" alt="Train icon">, or paste the SVG code inline to style it with CSS.

Browse all Keyline Icons →