import { Lock } from "fmicon-react";
<Lock size={24} strokeWidth={1} />
Props
| Prop | Type | Default | Description |
|---|---|---|---|
size | number | string | 24 | Width and height in pixels |
variant | "linear" | "bold" | … | linear | Any of the 8 styles, plus glass-light for light backgrounds |
color | string | currentColor | Any CSS colour; inherits the text colour by default |
strokeWidth | number | 1.5 | Line weight for linear, twotone, broken and duotone |
...props | SVG attributes | – | className, aria-label, onClick and the rest |
More in Security
What is the Lock Icon?
This lock icon shows a closed padlock with its shackle pressed down into the body. It signals that something is secured or restricted: a private album, a password field, a premium feature behind a plan, an encrypted chat or a setting that only an admin can change.
A shut padlock means protected, private or not available to you right now, and context decides which. Browsers taught people to see it as a sign of a secure connection, though most now show it less prominently. The open padlock means unlocked or editable, a shield means protection in general, and a key means signing in or credentials. On a toggle, the closed lock should show the current state, not the action.
When to Use the Lock Icon
- Sign-in form: sits inside the password input, next to the toggle that shows or hides the characters.
- Photo app: marks the hidden album that needs face recognition or a passcode to open.
- SaaS feature list: shows which tools need an upgrade, with the plan name revealed on hover.
- Document sharing dialog: indicates a file restricted to named people rather than anyone with the link.
The Lock Icon in Linear Style
Linear icons are drawn with a single even stroke and no fills, so they stay light next to body text. You can change the stroke weight from thin to bold without the shape falling apart.
Best for: toolbars, tab bars, settings lists and anything that sits beside text.
The same icon also comes in outline, bold, bulk, twotone, broken, glass and duotone. See every icon in this look on the free linear icons page.
How to Use the Lock Icon
- Customise it. Pick a stroke weight, size and colour on the left. Thin (1 px) looks best at large sizes, Regular (1.5 px) is the default.
- Copy or download. Copy the SVG, or download SVG, PNG or WebP at any size from 16 to 512 px.
- Drop it into code. Choose React, React Native, Vue, Svelte, Angular or Flutter above and copy the ready-made
LockIconcomponent. - Label it. If the icon is the only thing in a button, give it a name for screen readers:
aria-label="Lock item". If text sits next to it, usearia-hidden="true"instead.
Design Tips for the Lock Icon
- When the lock marks a paid feature, say so in text, such as Pro plan, because people may think the feature is broken or forbidden.
- Keep the gap inside the shackle clear at 16 px; if it fills in, the padlock starts to look like a shopping bag.
- On a lock toggle, update both the glyph and the label between Lock and Unlock so the current state is never ambiguous.
Icons That Work Well with Lock
Browse all security iconsLock Icon FAQ
No, they are the same symbol: people use both names interchangeably, and both mean secured or restricted. Some sets draw a door lock or keyhole for physical access, but in software the padlock is the standard for privacy and protection.
A lock suits privacy and password sections, but a shield usually reads better as the symbol for a whole security settings area. Use the shield for the section title and the lock for individual items, such as passwords, two-step sign-in and app passcodes.
Yes. The lock icon is one of 891 free, open-source icons you can use in personal and commercial work, including client projects and apps you sell. The packages are MIT licensed; keep the licence notice if you redistribute the icon files.
SVG, PNG and WebP, at any size from 16 to 512 pixels. You can also copy it as JSX or as a ready-made component for React, React Native, Vue, Svelte, Angular and Flutter, with your stroke weight and colour already applied.