Lock icon
flat-color-icons:lock
The Lock icon (flat-color-icons:lock) is a free SVG icon from the Flat Color Icons set by Icons8. It is drawn on a 48 × 48 grid. Flat Color 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
- Flat Color Icons
- Author
- Icons8
- License
- MIT
- Size
- 48 × 48
SVG code
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><path fill="#424242" d="M24 4c-5.5 0-10 4.5-10 10v4h4v-4c0-3.3 2.7-6 6-6s6 2.7 6 6v4h4v-4c0-5.5-4.5-10-10-10"/><path fill="#FB8C00" d="M36 44H12c-2.2 0-4-1.8-4-4V22c0-2.2 1.8-4 4-4h24c2.2 0 4 1.8 4 4v18c0 2.2-1.8 4-4 4"/><circle cx="24" cy="31" r="3" fill="#C76E00"/></svg>How to use the Lock icon
React
import { Icon } from "@iconify/react";
<Icon icon="flat-color-icons:lock" width="24" />Vue
<script setup>
import { Icon } from "@iconify/vue";
</script>
<template>
<Icon icon="flat-color-icons:lock" width="24" />
</template>Svelte
<script>
import Icon from "@iconify/svelte";
</script>
<Icon icon="flat-color-icons:lock" width="24" />Tailwind CSS
<!-- @iconify/tailwind plugin -->
<span class="icon-[flat-color-icons--lock]"></span>UnoCSS
<!-- @unocss/preset-icons + @iconify-json/flat-color-icons -->
<div class="i-flat-color-icons:lock"></div>Web component
<script src="https://code.iconify.design/iconify-icon/2.1.0/iconify-icon.min.js"></script>
<iconify-icon icon="flat-color-icons:lock"></iconify-icon>HTML image
<img src="https://iconyz.com/api/public/svg/flat-color-icons/lock.svg" alt="Lock icon" width="24" height="24">Related icons in Flat Color Icons
Lock icon in other icon sets
Lock icon FAQ
Is the Lock icon free for commercial use?
Yes. Flat Color Icons are released under the MIT license, which allows use in personal and commercial projects.
How do I use the Lock icon in React?
Install @iconify/react and render <Icon icon="flat-color-icons:lock" />, or use “Copy code” on this page to get a standalone React component.
How do I add the Lock icon to a web page?
Link the SVG file in an image tag: <img src="https://iconyz.com/api/public/svg/flat-color-icons/lock.svg" alt="Lock icon">, or paste the SVG code inline to style it with CSS.