X Square icon
ph:x-square
The X Square icon (ph:x-square) is a free SVG icon from the Phosphor set by Phosphor Icons. It is drawn on a 256 × 256 grid. Phosphor 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
- Phosphor
- Author
- Phosphor Icons
- License
- MIT
- Size
- 256 × 256
- Tags
- closed, cancelled, dismissed, xsquare
SVG code
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="256" viewBox="0 0 256 256"><path fill="currentColor" d="M208 32H48a16 16 0 0 0-16 16v160a16 16 0 0 0 16 16h160a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16m0 176H48V48h160zm-42.34-106.34L139.31 128l26.35 26.34a8 8 0 0 1-11.32 11.32L128 139.31l-26.34 26.35a8 8 0 0 1-11.32-11.32L116.69 128l-26.35-26.34a8 8 0 0 1 11.32-11.32L128 116.69l26.34-26.35a8 8 0 0 1 11.32 11.32"/></svg>How to use the X Square icon
React
import { Icon } from "@iconify/react";
<Icon icon="ph:x-square" width="24" />Vue
<script setup>
import { Icon } from "@iconify/vue";
</script>
<template>
<Icon icon="ph:x-square" width="24" />
</template>Svelte
<script>
import Icon from "@iconify/svelte";
</script>
<Icon icon="ph:x-square" width="24" />Tailwind CSS
<!-- @iconify/tailwind plugin -->
<span class="icon-[ph--x-square]"></span>UnoCSS
<!-- @unocss/preset-icons + @iconify-json/ph -->
<div class="i-ph:x-square"></div>Web component
<script src="https://code.iconify.design/iconify-icon/2.1.0/iconify-icon.min.js"></script>
<iconify-icon icon="ph:x-square"></iconify-icon>HTML image
<img src="https://iconyz.com/api/public/svg/ph/x-square.svg" alt="X Square icon" width="24" height="24">Related icons in Phosphor
X Square icon in other icon sets
X Square icon FAQ
Is the X Square icon free for commercial use?
Yes. Phosphor icons are released under the MIT license, which allows use in personal and commercial projects.
How do I use the X Square icon in React?
Install @iconify/react and render <Icon icon="ph:x-square" />, or use “Copy code” on this page to get a standalone React component.
How do I add the X Square icon to a web page?
Link the SVG file in an image tag: <img src="https://iconyz.com/api/public/svg/ph/x-square.svg" alt="X Square icon">, or paste the SVG code inline to style it with CSS.