The Heroicons key icon depicts a stylized key, commonly used to represent actions related to access, security, authentication, or unlocking features.
Common uses
- Login/Logout buttons
- Password reset links
- Access control settings
Use it in React
Install
npm i @heroicons/reactImport & render
import { KeyIcon } from '@heroicons/react/24/outline';
<KeyIcon className="size-6" />Styles
Heroicons ships this icon in 4 styles — each its own import:
24/outline
<KeyIcon className="size-6" />24/solid
<KeyIcon className="size-6" />20/solid
<KeyIcon className="size-6" />16/solid
<KeyIcon className="size-6" />Details
- Library
- Heroicons (324 icons)
- License
- MIT
- viewBox
0 0 24 24- Keywords
- keypasswordaccesssecurityunlock
FAQ
- What is the key icon used for?
- It signifies actions related to security, access, or unlocking content or features within an application.
- How do I use the key icon in React?
- Import it using `import { KeyIcon } from '@heroicons/react/24/outline'` and then use it as a component: `<KeyIcon className="h-6 w-6" />`.
- What is the license for Heroicons?
- Heroicons are provided under the MIT license, allowing for free use in both open-source and commercial projects.
Related icons
The same idea in other libraries, and near matches in Heroicons.
Looking for something else? Search Heroicons and 4 more libraries by description →
The search behind these pages runs as a Claude Code skill. What skills are and how I ship them →