Train icon
bx:train
The Train icon (bx:train) is a free SVG icon from the BoxIcons v2 set by Boxicons. It is drawn on a 24 × 24 grid. BoxIcons v2 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
- BoxIcons v2
- Author
- Boxicons
- License
- MIT
- Size
- 24 × 24
- Tags
- bx train
SVG code
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><circle cx="8.5" cy="14.5" r="1.5" fill="currentColor"/><circle cx="15.5" cy="14.5" r="1.5" fill="currentColor"/><path fill="currentColor" d="M18.87 3.34A3.55 3.55 0 0 0 16.38 2H7.62a3.47 3.47 0 0 0-2.5 1.35A4.32 4.32 0 0 0 4 6v12a1 1 0 0 0 1 1h2l-2 3h2.32L8 21h8l.68 1H19l-2-3h2a1 1 0 0 0 1-1V6a4.15 4.15 0 0 0-1.13-2.66M7.62 4h8.72a1.77 1.77 0 0 1 1 .66a3 3 0 0 1 .25.34H6.39a2.3 2.3 0 0 1 .25-.35A1.65 1.65 0 0 1 7.62 4M6 8V7h12v3H6zm12 9H6v-5h12z"/></svg>How to use the Train icon
React
import { Icon } from "@iconify/react";
<Icon icon="bx:train" width="24" />Vue
<script setup>
import { Icon } from "@iconify/vue";
</script>
<template>
<Icon icon="bx:train" width="24" />
</template>Svelte
<script>
import Icon from "@iconify/svelte";
</script>
<Icon icon="bx:train" width="24" />Tailwind CSS
<!-- @iconify/tailwind plugin -->
<span class="icon-[bx--train]"></span>UnoCSS
<!-- @unocss/preset-icons + @iconify-json/bx -->
<div class="i-bx:train"></div>Web component
<script src="https://code.iconify.design/iconify-icon/2.1.0/iconify-icon.min.js"></script>
<iconify-icon icon="bx:train"></iconify-icon>HTML image
<img src="https://iconyz.com/api/public/svg/bx/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. BoxIcons v2 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="bx: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/bx/train.svg" alt="Train icon">, or paste the SVG code inline to style it with CSS.