Train icon
bxs:train
The Train icon (bxs:train) is a free SVG icon from the BoxIcons v2 Solid set by Boxicons. It is drawn on a 24 × 24 grid. BoxIcons v2 Solid 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 Solid
- Author
- Boxicons
- License
- MIT
- Size
- 24 × 24
SVG code
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M16.375 2H7.621c-.224 0-1.399.065-2.503 1.351C4.031 4.616 4 5.862 4 6v11a2 2 0 0 0 2 2h1l-2 3h2.353l.667-1h8l.677 1H19l-2-3h1a2 2 0 0 0 2-2V6c.001-.188-.032-1.434-1.129-2.665C17.715 2.037 16.509 2 16.375 2M10 4h4v2h-4zM7.5 17a1.5 1.5 0 1 1 .001-3.001A1.5 1.5 0 0 1 7.5 17m9 0a1.5 1.5 0 1 1 .001-3.001A1.5 1.5 0 0 1 16.5 17m1.5-5H6V8h12z"/></svg>How to use the Train icon
React
import { Icon } from "@iconify/react";
<Icon icon="bxs:train" width="24" />Vue
<script setup>
import { Icon } from "@iconify/vue";
</script>
<template>
<Icon icon="bxs:train" width="24" />
</template>Svelte
<script>
import Icon from "@iconify/svelte";
</script>
<Icon icon="bxs:train" width="24" />Tailwind CSS
<!-- @iconify/tailwind plugin -->
<span class="icon-[bxs--train]"></span>UnoCSS
<!-- @unocss/preset-icons + @iconify-json/bxs -->
<div class="i-bxs:train"></div>Web component
<script src="https://code.iconify.design/iconify-icon/2.1.0/iconify-icon.min.js"></script>
<iconify-icon icon="bxs:train"></iconify-icon>HTML image
<img src="https://iconyz.com/api/public/svg/bxs/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 Solid 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="bxs: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/bxs/train.svg" alt="Train icon">, or paste the SVG code inline to style it with CSS.