Skip to content
Cuelark UI

Hover the icon or press Play. Suggested motion: shake. Pick another to preview it and update the animated code:

Heroicons · HiKey

Key icon

A free key icon from Heroicons, ready for React. Use it static or animated: both versions are below, copy-paste or one shadcn command away. Sized in em and colored by currentColor.

License
MIT license
Project
github.com
Install with shadcn
npx shadcn@latest add https://ui.cuelark.com/r/icons/heroicons/key.json
components/icons/heroicons-key.tsx
import * as React from "react";

/**
 * Key from Heroicons (https://github.com/tailwindlabs/heroicons), MIT.
 * Via Cuelark UI: ui.cuelark.com/icons/heroicons/key. Sized in em, colored by currentColor.
 */
export function HiKeyIcon(props: React.SVGProps<SVGSVGElement>) {
  return (
    <svg
      aria-hidden="true"
      viewBox="0 0 20 20"
      aria-hidden="true"
      stroke="currentColor"
      fill="currentColor"
      strokeWidth="0"
      width="1em"
      height="1em"
      xmlns="http://www.w3.org/2000/svg"
      {...props}
    >
      <path
        fillRule="evenodd"
        d="M18 8a6 6 0 01-7.743 5.743L10 14l-1 1-1 1H6v2H2v-4l4.257-4.257A6 6 0 1118 8zm-6-4a1 1 0 100 2 2 2 0 012 2 1 1 0 102 0 4 4 0 00-4-4z"
        clipRule="evenodd"
      />
    </svg>
  );
}
With react-icons
import { HiKey } from "react-icons/hi";

export function Example() {
  return <HiKey className="size-5" />;
}
key.svg
<svg
  viewBox="0 0 20 20"
  aria-hidden="true"
  stroke="currentColor"
  fill="currentColor"
  stroke-width="0"
  width="1em"
  height="1em"
  xmlns="http://www.w3.org/2000/svg"
>
  <path
    fill-rule="evenodd"
    d="M18 8a6 6 0 01-7.743 5.743L10 14l-1 1-1 1H6v2H2v-4l4.257-4.257A6 6 0 1118 8zm-6-4a1 1 0 100 2 2 2 0 012 2 1 1 0 102 0 4 4 0 00-4-4z"
    clip-rule="evenodd"
  />
</svg>
Attribution
"Key" icon from Heroicons (https://github.com/tailwindlabs/heroicons), licensed under MIT license.

Related icons: password, access, auth, login

Key icon in other sets