ICONYZ
English
Trash icon from HeroIcons

Trash icon

heroicons:trash

The Trash icon (heroicons:trash) is a free SVG icon from the HeroIcons set by Refactoring UI Inc. It is drawn on a 24 × 24 grid. HeroIcons 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
HeroIcons
Author
Refactoring UI Inc
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"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="m14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21q.512.078 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48 48 0 0 0-3.478-.397m-12 .562q.51-.088 1.022-.165m0 0a48 48 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a52 52 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a49 49 0 0 0-7.5 0"/></svg>

How to use the Trash icon

React

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

<Icon icon="heroicons:trash" width="24" />

Vue

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

<template>
  <Icon icon="heroicons:trash" width="24" />
</template>

Svelte

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

<Icon icon="heroicons:trash" width="24" />

Tailwind CSS

<!-- @iconify/tailwind plugin -->
<span class="icon-[heroicons--trash]"></span>

UnoCSS

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

Web component

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

<iconify-icon icon="heroicons:trash"></iconify-icon>

HTML image

<img src="https://iconyz.com/api/public/svg/heroicons/trash.svg" alt="Trash icon" width="24" height="24">

Related icons in HeroIcons

Trash icon in other icon sets

Trash icon FAQ

Is the Trash icon free for commercial use?

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

How do I use the Trash icon in React?

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

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

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

Browse all HeroIcons →