Magnet icon
la:magnet
The Magnet icon (la:magnet) is a free SVG icon from the Line Awesome set by Icons8. It is drawn on a 32 × 32 grid. Line Awesome icons are released under the Apache 2.0 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
- Line Awesome
- Author
- Icons8
- License
- Apache-2.0
- Size
- 32 × 32
- Category
- Science
- Tags
- magnet solid
SVG code
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><path fill="currentColor" d="M16 5C9.937 5 5 9.938 5 16v11h8V16c0-1.668 1.332-3 3-3s3 1.332 3 3v11h8V16c0-6.063-4.938-11-11-11m0 2c4.984 0 9 4.016 9 9v5h-4v-5c0-2.75-2.25-5-5-5s-5 2.25-5 5v5H7v-5c0-4.984 4.016-9 9-9M7 23h4v2H7zm14 0h4v2h-4z"/></svg>How to use the Magnet icon
React
import { Icon } from "@iconify/react";
<Icon icon="la:magnet" width="24" />Vue
<script setup>
import { Icon } from "@iconify/vue";
</script>
<template>
<Icon icon="la:magnet" width="24" />
</template>Svelte
<script>
import Icon from "@iconify/svelte";
</script>
<Icon icon="la:magnet" width="24" />Tailwind CSS
<!-- @iconify/tailwind plugin -->
<span class="icon-[la--magnet]"></span>UnoCSS
<!-- @unocss/preset-icons + @iconify-json/la -->
<div class="i-la:magnet"></div>Web component
<script src="https://code.iconify.design/iconify-icon/2.1.0/iconify-icon.min.js"></script>
<iconify-icon icon="la:magnet"></iconify-icon>HTML image
<img src="https://iconyz.com/api/public/svg/la/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. Line Awesome icons are released under the Apache 2.0 license, which allows use in personal and commercial projects.
How do I use the Magnet icon in React?
Install @iconify/react and render <Icon icon="la: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/la/magnet.svg" alt="Magnet icon">, or paste the SVG code inline to style it with CSS.