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 2 · HiLockClosed

Lock Closed icon

A free lock closed icon from Heroicons 2, 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-2/lock-closed.json
components/icons/heroicons-2-lock-closed.tsx
import * as React from "react";

/**
 * Lock Closed from Heroicons 2 (https://github.com/tailwindlabs/heroicons), MIT.
 * Via Cuelark UI: ui.cuelark.com/icons/heroicons-2/lock-closed. Sized in em, colored by currentColor.
 */
export function HiLockClosedIcon(props: React.SVGProps<SVGSVGElement>) {
  return (
    <svg
      aria-hidden="true"
      viewBox="0 0 24 24"
      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="M12 1.5a5.25 5.25 0 0 0-5.25 5.25v3a3 3 0 0 0-3 3v6.75a3 3 0 0 0 3 3h10.5a3 3 0 0 0 3-3v-6.75a3 3 0 0 0-3-3v-3c0-2.9-2.35-5.25-5.25-5.25Zm3.75 8.25v-3a3.75 3.75 0 1 0-7.5 0v3h7.5Z"
        clipRule="evenodd"
      />
    </svg>
  );
}
With react-icons
import { HiLockClosed } from "react-icons/hi2";

export function Example() {
  return <HiLockClosed className="size-5" />;
}
lock-closed.svg
<svg
  viewBox="0 0 24 24"
  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="M12 1.5a5.25 5.25 0 0 0-5.25 5.25v3a3 3 0 0 0-3 3v6.75a3 3 0 0 0 3 3h10.5a3 3 0 0 0 3-3v-6.75a3 3 0 0 0-3-3v-3c0-2.9-2.35-5.25-5.25-5.25Zm3.75 8.25v-3a3.75 3.75 0 1 0-7.5 0v3h7.5Z"
    clip-rule="evenodd"
  />
</svg>
Attribution
"Lock Closed" icon from Heroicons 2 (https://github.com/tailwindlabs/heroicons), licensed under MIT license.

Related icons: secure, security, password, padlock

Lock Closed icon in other sets