key-cap from Akar Icons by Arturo Wibawa · Outline · MIT Free for personal and commercial use.

Name
key-cap
Set
Akar Icons
Style
Outline
Viewbox
24×24
License
MIT

Use the key cap icon

SVG

<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M7 3s3 .5 5 .5s5-.5 5-.5l1 9s-3 1-6 1s-6-1-6-1z"/><path d="m3.869 8.147l-.862 10.294c-.03.366.04.733.205 1.06l.197.393A2.01 2.01 0 0 0 5.206 21h13.588a2.01 2.01 0 0 0 1.797-1.106l.197-.392c.165-.328.236-.695.205-1.06l-.862-10.295a4 4 0 0 0-.79-2.068L17 3s-3 .5-5 .5S6.978 3 6.978 3l-2.32 3.08a4 4 0 0 0-.79 2.067M6 12l-2.5 8M18 12l2.5 8"/></g></svg>

React

import type { SVGProps } from "react";

export function AkarIconsKeyCap(props: SVGProps<SVGSVGElement>) {
  return (
    <svg {...props} xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2"><path d="M7 3s3 .5 5 .5s5-.5 5-.5l1 9s-3 1-6 1s-6-1-6-1z"/><path d="m3.869 8.147l-.862 10.294c-.03.366.04.733.205 1.06l.197.393A2.01 2.01 0 0 0 5.206 21h13.588a2.01 2.01 0 0 0 1.797-1.106l.197-.392c.165-.328.236-.695.205-1.06l-.862-10.295a4 4 0 0 0-.79-2.068L17 3s-3 .5-5 .5S6.978 3 6.978 3l-2.32 3.08a4 4 0 0 0-.79 2.067M6 12l-2.5 8M18 12l2.5 8"/></g></svg>
  );
}

Vue

<template>
  <svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M7 3s3 .5 5 .5s5-.5 5-.5l1 9s-3 1-6 1s-6-1-6-1z"/><path d="m3.869 8.147l-.862 10.294c-.03.366.04.733.205 1.06l.197.393A2.01 2.01 0 0 0 5.206 21h13.588a2.01 2.01 0 0 0 1.797-1.106l.197-.392c.165-.328.236-.695.205-1.06l-.862-10.295a4 4 0 0 0-.79-2.068L17 3s-3 .5-5 .5S6.978 3 6.978 3l-2.32 3.08a4 4 0 0 0-.79 2.067M6 12l-2.5 8M18 12l2.5 8"/></g></svg>
</template>

CSS

.icon-key-cap {
  width: 24px;
  height: 24px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%221em%22%20height%3D%221em%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20stroke-width%3D%222%22%3E%3Cpath%20d%3D%22M7%203s3%20.5%205%20.5s5-.5%205-.5l1%209s-3%201-6%201s-6-1-6-1z%22%2F%3E%3Cpath%20d%3D%22m3.869%208.147l-.862%2010.294c-.03.366.04.733.205%201.06l.197.393A2.01%202.01%200%200%200%205.206%2021h13.588a2.01%202.01%200%200%200%201.797-1.106l.197-.392c.165-.328.236-.695.205-1.06l-.862-10.295a4%204%200%200%200-.79-2.068L17%203s-3%20.5-5%20.5S6.978%203%206.978%203l-2.32%203.08a4%204%200%200%200-.79%202.067M6%2012l-2.5%208M18%2012l2.5%208%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%221em%22%20height%3D%221em%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20stroke-width%3D%222%22%3E%3Cpath%20d%3D%22M7%203s3%20.5%205%20.5s5-.5%205-.5l1%209s-3%201-6%201s-6-1-6-1z%22%2F%3E%3Cpath%20d%3D%22m3.869%208.147l-.862%2010.294c-.03.366.04.733.205%201.06l.197.393A2.01%202.01%200%200%200%205.206%2021h13.588a2.01%202.01%200%200%200%201.797-1.106l.197-.392c.165-.328.236-.695.205-1.06l-.862-10.295a4%204%200%200%200-.79-2.068L17%203s-3%20.5-5%20.5S6.978%203%206.978%203l-2.32%203.08a4%204%200%200%200-.79%202.067M6%2012l-2.5%208M18%2012l2.5%208%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E") no-repeat center / contain;
}

Direct links: SVG · download · JSON · https://iconsdb.app/api/v1/icon/akar-icons/key-cap.svg?color=%231a73e8&size=48