Magnet icon
codicon:magnet
The Magnet icon (codicon:magnet) is a free SVG icon from the Codicons set by Microsoft Corporation. It is drawn on a 24 × 24 grid. Codicons are released under the CC BY 4.0 license, which allows use in personal and commercial projects as long as you credit the author. Copy it as SVG, JSX, Vue or Svelte code, or download the SVG file.
- Icon set
- Codicons
- Author
- Microsoft Corporation
- License
- CC-BY-4.0
- 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="M8.587 2.028a5.94 5.94 0 0 0-4.623 1.531A6 6 0 0 0 1.999 8v5c0 .551.449 1 1 1h2c.551 0 1-.449 1-1V8a2 2 0 0 1 2.208-1.989c1.005.1 1.792 1.037 1.792 2.132V13c0 .551.449 1 1 1h2c.551 0 1-.449 1-1V8.236c0-3.192-2.376-5.919-5.412-6.208M3 13v-2h2v2zm5.308-7.984a3 3 0 0 0-2.32.759A3 3 0 0 0 5 8v2H3V8c0-1.406.597-2.755 1.638-3.701a4.98 4.98 0 0 1 3.855-1.276C11.02 3.264 13 5.554 13 8.236V10h-2V8.143c0-1.603-1.183-2.976-2.692-3.127M11 13v-2h2v2z"/></svg>How to use the Magnet icon
React
import { Icon } from "@iconify/react";
<Icon icon="codicon:magnet" width="24" />Vue
<script setup>
import { Icon } from "@iconify/vue";
</script>
<template>
<Icon icon="codicon:magnet" width="24" />
</template>Svelte
<script>
import Icon from "@iconify/svelte";
</script>
<Icon icon="codicon:magnet" width="24" />Tailwind CSS
<!-- @iconify/tailwind plugin -->
<span class="icon-[codicon--magnet]"></span>UnoCSS
<!-- @unocss/preset-icons + @iconify-json/codicon -->
<div class="i-codicon:magnet"></div>Web component
<script src="https://code.iconify.design/iconify-icon/2.1.0/iconify-icon.min.js"></script>
<iconify-icon icon="codicon:magnet"></iconify-icon>HTML image
<img src="https://iconyz.com/api/public/svg/codicon/magnet.svg" alt="Magnet icon" width="24" height="24">Magnet icon in other icon sets
Magnet icon FAQ
Is the Magnet icon free for commercial use?
Yes. Codicons are released under the CC BY 4.0 license, which allows use in personal and commercial projects as long as you credit the author.
How do I use the Magnet icon in React?
Install @iconify/react and render <Icon icon="codicon:magnet" />, or use “Copy code” on this page to get a standalone React component.
How do I add the Magnet icon to a web page?
Link the SVG file in an image tag: <img src="https://iconyz.com/api/public/svg/codicon/magnet.svg" alt="Magnet icon">, or paste the SVG code inline to style it with CSS.