Lock icon
gg:lock
The Lock icon (gg:lock) is a free SVG icon from the css.gg set by Astrit. It is drawn on a 24 × 24 grid. css.gg 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.
SVG code
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" fill-rule="evenodd" d="M18 10.5a3 3 0 0 1 3 3v6a3 3 0 0 1-3 3H6a3 3 0 0 1-3-3v-6a3 3 0 0 1 3-3v-3a6 6 0 1 1 12 0zm-6-7a4 4 0 0 1 4 4v3H8v-3a4 4 0 0 1 4-4m6 9H6a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-6a1 1 0 0 0-1-1" clip-rule="evenodd"/></svg>How to use the Lock icon
React
import { Icon } from "@iconify/react";
<Icon icon="gg:lock" width="24" />Vue
<script setup>
import { Icon } from "@iconify/vue";
</script>
<template>
<Icon icon="gg:lock" width="24" />
</template>Svelte
<script>
import Icon from "@iconify/svelte";
</script>
<Icon icon="gg:lock" width="24" />Tailwind CSS
<!-- @iconify/tailwind plugin -->
<span class="icon-[gg--lock]"></span>UnoCSS
<!-- @unocss/preset-icons + @iconify-json/gg -->
<div class="i-gg:lock"></div>Web component
<script src="https://code.iconify.design/iconify-icon/2.1.0/iconify-icon.min.js"></script>
<iconify-icon icon="gg:lock"></iconify-icon>HTML image
<img src="https://iconyz.com/api/public/svg/gg/lock.svg" alt="Lock icon" width="24" height="24">Related icons in css.gg
Lock icon in other icon sets
Lock icon FAQ
Is the Lock icon free for commercial use?
Yes. css.gg 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="gg: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/gg/lock.svg" alt="Lock icon">, or paste the SVG code inline to style it with CSS.