X icon
thesvg:x
The X icon (thesvg:x) is a free SVG icon from the theSVG set by thesvg.org. It is drawn on a 24 × 24 grid. theSVG 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
- theSVG
- Author
- thesvg.org
- 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="M14.234 10.162L22.977 0h-2.072l-7.591 8.824L7.251 0H.258l9.168 13.343L.258 24H2.33l8.016-9.318L16.749 24h6.993zm-2.837 3.299l-.929-1.329L3.076 1.56h3.182l5.965 8.532l.929 1.329l7.754 11.09h-3.182z"/></svg>How to use the X icon
React
import { Icon } from "@iconify/react";
<Icon icon="thesvg:x" width="24" />Vue
<script setup>
import { Icon } from "@iconify/vue";
</script>
<template>
<Icon icon="thesvg:x" width="24" />
</template>Svelte
<script>
import Icon from "@iconify/svelte";
</script>
<Icon icon="thesvg:x" width="24" />Tailwind CSS
<!-- @iconify/tailwind plugin -->
<span class="icon-[thesvg--x]"></span>UnoCSS
<!-- @unocss/preset-icons + @iconify-json/thesvg -->
<div class="i-thesvg:x"></div>Web component
<script src="https://code.iconify.design/iconify-icon/2.1.0/iconify-icon.min.js"></script>
<iconify-icon icon="thesvg:x"></iconify-icon>HTML image
<img src="https://iconyz.com/api/public/svg/thesvg/x.svg" alt="X icon" width="24" height="24">Related icons in theSVG
X icon in other icon sets
X icon FAQ
Is the X icon free for commercial use?
Yes. theSVG icons are released under the MIT license, which allows use in personal and commercial projects.
How do I use the X icon in React?
Install @iconify/react and render <Icon icon="thesvg:x" />, or use “Copy code” on this page to get a standalone React component.
How do I add the X icon to a web page?
Link the SVG file in an image tag: <img src="https://iconyz.com/api/public/svg/thesvg/x.svg" alt="X icon">, or paste the SVG code inline to style it with CSS.