Train icon
iconoir:train
The Train icon (iconoir:train) is a free SVG icon from the Iconoir set by Luca Burgio. It is drawn on a 24 × 24 grid. Iconoir 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
- Iconoir
- Author
- Luca Burgio
- License
- MIT
- Size
- 24 × 24
- Category
- Transport
- Tags
- train outline
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-width="1.5"><path stroke-linejoin="round" d="M9.609 7h4.782A2.61 2.61 0 0 1 17 9.609a.39.39 0 0 1-.391.391H7.39A.39.39 0 0 1 7 9.609A2.61 2.61 0 0 1 9.609 7"/><path stroke-linejoin="round" d="M9 3h6a6 6 0 0 1 6 6v4a6 6 0 0 1-6 6H9a6 6 0 0 1-6-6V9a6 6 0 0 1 6-6m7 12.01l.01-.011M8 15.01l.01-.011"/><path d="m10.5 19l-2 2.5m5-2.5l2 2.5m1-2.5l2 2.5M7.5 19l-2 2.5"/></g></svg>How to use the Train icon
React
import { Icon } from "@iconify/react";
<Icon icon="iconoir:train" width="24" />Vue
<script setup>
import { Icon } from "@iconify/vue";
</script>
<template>
<Icon icon="iconoir:train" width="24" />
</template>Svelte
<script>
import Icon from "@iconify/svelte";
</script>
<Icon icon="iconoir:train" width="24" />Tailwind CSS
<!-- @iconify/tailwind plugin -->
<span class="icon-[iconoir--train]"></span>UnoCSS
<!-- @unocss/preset-icons + @iconify-json/iconoir -->
<div class="i-iconoir:train"></div>Web component
<script src="https://code.iconify.design/iconify-icon/2.1.0/iconify-icon.min.js"></script>
<iconify-icon icon="iconoir:train"></iconify-icon>HTML image
<img src="https://iconyz.com/api/public/svg/iconoir/train.svg" alt="Train icon" width="24" height="24">Train icon in other icon sets
Train icon FAQ
Is the Train icon free for commercial use?
Yes. Iconoir 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="iconoir: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/iconoir/train.svg" alt="Train icon">, or paste the SVG code inline to style it with CSS.