---
title: "Lock file animated icon"
description: "Lock file animated icon (Files & folders). Unlocked → locked: the raised shackle swings down about its left leg and seats in the body. Strong: a small extra lift, a fast slam with a hit that thumps the body, and a short bounce. Reverse lifts the shackle open."
canonical: https://generativeicons.com/icons/lock-file/
---

# Lock file animated icon

Unlocked → locked: the raised shackle swings down about its left leg and seats in the body. Strong: a small extra lift, a fast slam with a hit that thumps the body, and a short bounce. Reverse lifts the shackle open.

- Id: `lock-file`
- Category: Files & folders
- Search terms: protect document, protected document, password protect, encrypted file, encrypt file, secure document, read only, read-only, private document, confidential, locked document, lock document
- Two states: unlocked to locked, played forward and back
- Styles: outline, solid, duotone; outline weights 1.5, 2, 2.5 (any from 1 to 3); motion light or strong
- File: https://generativeicons.com/assets/lock-file.lottie (dotLottie, 38946 bytes, sha256 df555200a26e53404deb944270756bf8dd625b269b74ab9c57b99b7a66e855e4)
- License: MIT

## Install

```sh
npm install @lottiefiles/generative-icons-runtime
npx generative-icons init
npx generative-icons add lock-file
```

## React

```tsx
// npm install @lottiefiles/generative-icons-react
'use client';
import { AnimatedIcon } from '@lottiefiles/generative-icons-react';
import icon, { src } from './generative-icons/lock-file.mjs';

export function LockFileIcon() {
  return <AnimatedIcon icon={icon} src={src} size={32}
    color="#ffffff" variant="outline" weight={2}
    motion="light" theme="dark" />;
}
```

## JavaScript

```js
import { createIcon } from '@lottiefiles/generative-icons-runtime';
import icon, { src } from './generative-icons/lock-file.mjs';

const handle = await createIcon(canvas, {
  icon, src,
  color: '#ffffff', style: 'outline', weight: 2,
  motion: 'light', theme: 'dark'
});
button.addEventListener('click', () => handle.play());
// On removal: handle.destroy();
```

More: https://generativeicons.com/icons/lock-file/ · https://generativeicons.com/api/icons/lock-file
