Trash icon
codex:trash
The Trash icon (codex:trash) is a free SVG icon from the CodeX Icons set by CodeX. It is drawn on a 24 × 24 grid. CodeX 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
- CodeX Icons
- Author
- CodeX
- 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="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M18.133 7.723q.435.06.867.128m-.867-.128l-.906 9.68c-.037.434-.254.84-.607 1.136a2.02 2.02 0 0 1-1.297.461H8.677c-.48 0-.944-.164-1.297-.46a1.67 1.67 0 0 1-.607-1.138l-.906-9.679m12.266 0a45 45 0 0 0-2.951-.305m-9.315.305q-.435.06-.867.127m.867-.127a45 45 0 0 1 2.951-.305m6.364 0a45.5 45.5 0 0 0-6.364 0m6.364 0c0-2.114-1.455-3.07-3.182-3.07S8.818 5.44 8.818 7.418M10.5 15.5L10 11m4 0l-.5 4.5"/></svg>How to use the Trash icon
React
import { Icon } from "@iconify/react";
<Icon icon="codex:trash" width="24" />Vue
<script setup>
import { Icon } from "@iconify/vue";
</script>
<template>
<Icon icon="codex:trash" width="24" />
</template>Svelte
<script>
import Icon from "@iconify/svelte";
</script>
<Icon icon="codex:trash" width="24" />Tailwind CSS
<!-- @iconify/tailwind plugin -->
<span class="icon-[codex--trash]"></span>UnoCSS
<!-- @unocss/preset-icons + @iconify-json/codex -->
<div class="i-codex:trash"></div>Web component
<script src="https://code.iconify.design/iconify-icon/2.1.0/iconify-icon.min.js"></script>
<iconify-icon icon="codex:trash"></iconify-icon>HTML image
<img src="https://iconyz.com/api/public/svg/codex/trash.svg" alt="Trash icon" width="24" height="24">Trash icon in other icon sets
Trash icon FAQ
Is the Trash icon free for commercial use?
Yes. CodeX Icons 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="codex: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/codex/trash.svg" alt="Trash icon">, or paste the SVG code inline to style it with CSS.