JSXIcons.com

General icon

Lock JSX Icon

Copy the Lock icon as an optimized JSX SVG component for React, Next.js, dashboards, landing pages and Tailwind interfaces.

Browse all icons
ComponentLockIcon
FilelockIcon.jsx
CategoryGeneral

Copy-ready code

Lock React JSX component

// Source: https://unpkg.com/lucide-static@1.25.0/icons/lock.svg
// Asset license: Lucide ISC. Some Lucide glyphs derive from Feather under MIT; see the upstream license.
export const LockIcon = ({ width = "40px", height = "40px", color = "currentColor", ...props }) => (
  <svg {...props} width={width} height={height} viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="none" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true" role="img">
    <rect width="18" height="11" x="3" y="11" rx="2" ry="2" />
  <path d="M7 11V7a5 5 0 0 1 10 0v4" />
  </svg>
)

How to use the Lock icon

import { LockIcon } from "@/assets/icons/lockIcon"

export default function Example() {
  return <LockIcon width="32px" height="32px" />
}

Built for the web

Use it in your stack

This copy-ready component works in React and Next.js projects, and the SVG can be adapted for any interface.

ReactNext.jsJSXSVGGeneral icons

Looking for a similar mark? Browse the related icons below or explore the full general collection.

Related JSX icons

FAQ

Is the Lock JSX icon free?

Yes. You can copy the JSX component and use it in React and Next.js projects.

Can I customize it?

Yes. Edit the SVG attributes or pass className, width, height and color props depending on the component.