# Lucide React — card for AI agents

Comprehensive icon library with consistent design for React applications.

Category: UI components and icons · npm package `lucide-react` · latest version 1.66.0 (checked 2026-11-01)
Install: `npm install lucide-react`
License: ISC (permissive)

In your own product (generator, app, hosted service): **yes**. Permissive license: ship it inside your own product, closed or open source, and keep its license and copyright notice.

## Rules for AI agents (paste into AGENTS.md or CLAUDE.md)

## Lucide React
- Install with `npm install lucide-react` (or the pnpm, yarn or bun equivalent).
- Import icons by name, e.g. `import { Camera } from 'lucide-react'`. The docs say only imported icons are bundled and the rest are tree-shaken away.
- Style icons with `size` (default 24), `color` (default `currentColor`), `strokeWidth` (default 2) and `nonScalingStroke` (default false). Any standard SVG attribute can also be passed as a prop.
- `color` defaults to `currentColor`, so an icon can take its parent element's text color.
- To style every icon at once, use CSS or the Lucide context provider instead of repeating props.
- Do not use brand icons. Github, LinkedIn, Slack and others were removed in v1. Use the brand's official SVG or Simple Icons.
- For more detail, read `https://lucide.dev/llms.txt` or `/llms-full.txt`.

## Docs written for agents
- [llms.txt (index of the docs)](https://lucide.dev/llms.txt)

## What it is
- Lucide is an open-source icon set that began as a fork of Feather Icons and is maintained by a community. The README describes "1600+ vector (svg) files", and the site's search box counts 1877 icons. `lucide-react` is the React package. Sibling packages cover vanilla JS, Vue, Svelte, Solid, Preact, React Native, Angular, Astro and static SVG, and there is also a Figma plugin.
- In React, you import each icon by name, such as `Camera`, and it renders as an inline `<svg>`. Four props control its look: `size`, `color`, `strokeWidth` and `nonScalingStroke`. Any standard SVG attribute can also be passed as a prop. The docs say Lucide is built with ES Modules, so only the icons you import end up in the final bundle.
- It suits React projects that need a large, consistent set of interface icons under a permissive license. It does not fit projects that need company logos, because brand icons were removed in v1.

## Caveats
- No brand logos, and v1 removed the old ones: Icons such as Github, Gitlab, LinkedIn, Instagram, Facebook, Figma and Slack are gone in v1. The docs recommend each brand's official SVG or Simple Icons instead. The README says brand logos will not be accepted in the future either.
- Filled icons are a workaround: The docs say fills are not officially supported. You can set the `fill` attribute, but only on certain icons.
- Pin the version when loading the core package from a CDN: This applies to the vanilla `lucide` package on unpkg. The docs advise pinning a specific version instead of `@latest`, because a new release can break your app.

## Numbers (AgentGid data)
- Gid Score: 85.9 (#33 of all tools, 2 of 230 in its category)
- Used in 1,255 public projects set up for AI coding agents (20.1%)
- Downloads last week: 143,862,198 (as of 2026-11-24), +25.4% over 4 weeks
- GitHub stars: 25,966 (as of 2026-11-24)
- Last push: 2026-11-24

## Often used with
clsx 82.2%, Tailwind Merge 81.0%, Class Variance Authority 74.9%, React 98.8%, Tailwind CSS 96.3%, Radix UI 61.6%

## Checked alternatives (same job)
- React Icons: https://agentgid.com/tools/react-icons/agent.md
- Heroicons: https://agentgid.com/tools/heroicons/agent.md

## Links
- AgentGid page: https://agentgid.com/tools/lucide-react/
- Homepage: https://lucide.dev
- Repository: https://github.com/lucide-icons/lucide
- Source: https://github.com/lucide-icons/lucide#readme
- Source: https://github.com/lucide-icons/lucide
- Source: https://github.com/lucide-icons/lucide/releases
- Source: https://lucide.dev
- Source: https://lucide.dev/llms.txt
- Source: https://lucide.dev/guide/lucide/getting-started.md
- Source: https://lucide.dev/guide/lucide/migration.md
- Source: https://lucide.dev/guide/react/getting-started.md


## lucide-react: Lucide line icons as React components

lucide-react is the free React package of the Lucide icon set. Each icon, like a house, a bell or a check mark, is a ready piece you put on a screen and size or color with a setting. Only the icons you use end up in your app.

### Where to use it
- Icon buttons in a toolbar: An editor toolbar or a card menu shows small icon-only buttons such as bold, link or undo. Each button gets a spoken label for screen reader users.
- Colored status messages: Payment, warning and error notes each get a matching icon in green, amber or red next to the text.
- One look for a whole panel: A dark settings panel needs all its icons a bit smaller, lighter and thinner; you set that once around the panel.
- Icons chosen by name in an admin panel: Editors type an icon name such as "rocket" for a feature block, the name is saved, and the page shows that icon.
- Extra icons in the same style: You need an icon the main set lacks; the Lucide Lab collection or your own drawing shows up with the same size and line settings.
- Moving off react-feather: An older app uses react-feather icons; you switch the import line and keep almost every icon name.

### How to start
- Add the package to your React project.

```
npm install lucide-react
```

- Import an icon by name and use it like any component.

```
import { Camera } from 'lucide-react';
// Usage
const App = () => {
  return <Camera />;
};
export default App;
```

- Change size, color and line width with props (defaults 24, the text color and 2).

```
const App = () => {
  return <Camera size={48} color="red" strokeWidth={1} />;
};
```


### License
Free for personal and paid products under the ISC license, with no visible credit needed. Keep the short copyright and permission notice with copies of the code.

### Good to know
- Version 1 removed all brand icons, such as Github, Figma and Slack. Get logos from the brands themselves or Simple Icons.
- Icons are hidden from screen readers by default. An icon that carries meaning alone needs a label or a title.
- Loading icons by name (DynamicIcon) pulls every icon into the build. It can flash while loading, so use it only for names that come from data.
- Since version 1 there is no single script file for a plain script tag; the package is meant for a React build.
- New versions come out often; 1.70.0 came out on November 6, 2026, so pin the version you tested.

Checked 2026-11-10 against: https://lucide.dev/, https://lucide.dev/llms.txt, https://lucide.dev/license.md, https://lucide.dev/guide/react.md, https://lucide.dev/guide/version-1.md, https://lucide.dev/guide/react/getting-started.md, https://lucide.dev/guide/react/migration.md, https://lucide.dev/guide/react/migration-from-feather.md, https://lucide.dev/guide/react/basics/sizing.md, https://lucide.dev/guide/react/basics/color.md, https://lucide.dev/guide/react/basics/stroke-width.md, https://lucide.dev/guide/react/advanced/accessibility.md, https://lucide.dev/guide/react/advanced/global-styling.md, https://lucide.dev/guide/react/advanced/dynamic-icon-component.md, https://lucide.dev/guide/react/advanced/with-lucide-lab.md, https://lucide.dev/guide/react/advanced/aliased-names.md, https://lucide.dev/guide/react/advanced/typescript.md, https://github.com/lucide-icons/lucide/blob/main/README.md, https://registry.npmjs.org/lucide-react, https://registry.npmjs.org/lucide-react/1.70.0

### Mistakes to avoid
- Don't: import { Github, Facebook, Slack } from 'lucide-react' → Do: Take brand logos from the brand's own files or from Simple Icons (Brand icons were removed in version 1; in our check of 1.70.0 there is no Github export.)
- Don't: <House absoluteStrokeWidth size={48} /> → Do: <House nonScalingStroke size={48} /> (absoluteStrokeWidth is marked deprecated; nonScalingStroke keeps the line width the same at any size.)
- Don't: <button><Trash2 /></button> with no label, or aria-label put on the icon inside a button → Do: <button aria-label="Delete file"><Trash2 /></button> (Icons are hidden from screen readers by default, so the button needs its own label.)
- Don't: Using DynamicIcon for icons whose names are known when you write the code → Do: Import those icons directly; keep DynamicIcon for names that come from data (DynamicIcon brings every icon into the build and loads each one separately.)
- Don't: A global .lucide { width: 20px } rule plus size={32} on one icon, expecting the prop to win → Do: Use LucideProvider for shared defaults when single icons must keep their own size, color or strokeWidth (CSS rules override the icon props.)

### Questions
- Will all 2,000 icons make my app heavy? No. Only the icons you import end up in your bundle.
- How do I make every icon a bit smaller or thinner? Wrap that part of the app in LucideProvider, or style the lucide class in your CSS. CSS overrides the props of single icons, the provider does not.
- Why do Home and House both work? Some icons have several names; Home, HomeIcon and LucideHome are the same icon as House.
- Can I use it in a paid product or a client site? Yes. The ISC license allows any use with or without a fee; keep the notice in copies of the code.
- Which React versions does it work with? React 16.5.1 and newer, up to React 19.

---
AgentGid's catalog is curated: every entry was checked against the maker's official pages (registry, repository, license and pricing pages) on the date shown; a license value shows the quote it stands on wherever AgentGid has one. Usage numbers come from AgentGid's own scan of public repositories set up for AI coding agents. Claims by makers are reported, not tested by AgentGid.
