X icon
Download the X icon as free SVG or PNG. Compare outline and filled styles. Copy React, Vue or Svelte code.
- close
- cancel
- remove
- delete
- dismiss
- exit
- clear
- cross
- times
- multiply
Style
Size
Stroke
Filled icons have no stroke
Color
- Category
- general
- Styles
- Outline, filled
- Component
- IconX
- License
- MIT · Paweł Kuna
- Files
-
outline/x.svg
filled/x.svg
Code
Copy it the way you use it
x.svg
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M18 6l-12 12" />
<path d="M6 6l12 12" />
</svg> Use the X icon
Use X for a close or dismiss action when the surrounding control makes that meaning clear. A button label such as Close dialog distinguishes it from a delete action.
For a decorative icon beside text, add aria-hidden="true" to the SVG. For an icon-only control, put its accessible name on the button or link.
React example
import { IconX } from '@tabler/icons-react';
<IconX size={24} stroke={2} />Read the React guideVue example
import { IconX } from '@tabler/icons-vue';
<IconX :size="24" :stroke="2" />Read the Vue guideSvelte 5 example
import { IconX } from '@tabler/icons-svelte-runes';
<IconX size={24} stroke={2} />Read the Svelte guideCompare variants and alternatives
Related