Skip to content
tablericons

general

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
Color
Download SVG

Press C to copy SVG, J for JSX, D to download.

Category
general
Styles
Outline, filled
Component
IconX
License
MIT · Paweł Kuna

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 guide
Vue example
import { IconX } from '@tabler/icons-vue';

<IconX :size="24" :stroke="2" />
Read the Vue guide
Svelte 5 example
import { IconX } from '@tabler/icons-svelte-runes';

<IconX size={24} stroke={2} />
Read the Svelte guide

Compare variants and alternatives

Related

Related icons

See all 788 general icons