* Add `motorbike` and `dirtbike` icons
* Renamed `dirtbike` to `dirt-bike`
* Deleted `dirt-bike` in order to move it to a separate PR
* Update motorbike.svg
---------
Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
* fix(icons): increase base height of list/text and derived icons for more consistent optical volume
* refactor(icons): upgrade list-chevrons-down-up
feat(icons): add list-chevrons-up-down
---------
Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
* Discussion - GitHub's discussions section uses this type of icon
* Interview - e.g. a category of content, alongside "article", "video", "podcast"
* Debate - in a similar vein to "interview"
* docs(): added official statement on brand logos in Lucide
* docs(): fix accidental typo from adding link
* docs(): migrating some stuff to a more accessible plain language format
* Update .github/ISSUE_TEMPLATE/01_icon_request.yml
* Update .github/ISSUE_TEMPLATE/01_icon_request.yml
Co-authored-by: Jakob Guddas <github@jguddas.de>
* Update README.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update .github/pull_request_template.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Jakob Guddas <github@jguddas.de>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* feat(SvgPreview): add features from lucide studio
* Update docs/.vitepress/lib/SvgPreview/index.tsx
---------
Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
Fixes#3359
Throwing an error in readAllMetadata now to ensure this error can't happen again in the future.
The error was caused by this script being moved to a different dir, but the relative url not being updated, causing no icons to be found.
* docs(lucide-react): small changes for DynamicIcon
Changed the sentence structure slightly for DynamicIcon to be easier to understand.
* Update lucide-react.md
* Add gpt tags
* Add github actions flow
* Add link so people can use the chat
* Fix workflow
* Add openai dep
* Add actions core
* Try gh pr review in actions
* Try with octokit
* Remove changed files part
* Try with createReview function
* Try this
* fix broken json file
* Turn on review by gh action
* Try this
* Update icons/trash.json
* Update the runner
* Remove added tags
* Add more checks
* Added icons/tool-case.svg
* Added icons/tool-case.json
* Update tool-case.svg
slightly alter the icon SVG code to match with the "archive" icon
* Update tool-case.svg
* Optimized version of tool-case.svg
* Update icons/tool-case.json
Co-authored-by: Jakob Guddas <github@jguddas.de>
* Update tool-case.svg
---------
Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
Co-authored-by: Jakob Guddas <github@jguddas.de>
* Update base `clock`-icons
Replace `<polyline/>`s with `<path/>`s, and adjust the angles of the 2-, 4-, 8- and 10 o'clock hour hands to better match the 1-, 5-, 7- and 11 o'clock hands
* Update clocks with symbols
Update `clock-arrow-down`, `clock-arrow-up` and `clock-alert` to match the hand angle of `clock`
Also align the exclamation mark of `clock-alert` to the pixel grid
* Update small clock faces
Make the clock faces in `calendar-clock`, `file-clock`, `folder-clock` and `watch` consistent with each other, and resolve some two-pixel-gap violations.
* Align the tips of all hours hands on large clocks to the grid
* Add self-attribution where appropriate
---------
Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
* Added icons/wavy-line.svg
* Added icons/wavy-line.json
* Updated icons/wavy-line.json
* Updated icons/wavy-line.json
* Rename wavy-line.json to line-curvy.json
* Rename wavy-line.svg to line-curvy.svg
* Rename line-curvy.json to line-swirly.json
* Rename line-curvy.svg to line-swirly.svg
* Rename line-swirly.json to line-squiggle.json
* Rename line-swirly.svg to line-squiggle.svg
* Align the icon in the center
* Update icon visually
* Circle the loop of the icon
* Add contributor
* Add `"annotate"` as tag
After seeing Google Chromebook the same icon, it says 'annotate'. I add it here as a tag.
* Update line-squiggle.json
* Update line-squiggle.json
---------
Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
Reordered SVG paths so the shaft renders after the arrowhead, eliminating visual gaps due to stroke rendering.
Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
- Reduce initial icon render from 1600 to 120-200 icons
- Implement dynamic initialGridItems calculation based on viewport
- Use slice() instead of splice() to avoid array mutation
- Fix NoResults condition to use searchResults.length
- Load time improved from (50-60%+ improvement)
- Fix Switch component to properly handle v-model binding
- Add absoluteStrokeWidth to customizingActive computed property
- Ensure absoluteStrokeWidth resets correctly in both Home and Sidebar customizers
Resolves issue where absoluteStrokeWidth toggle remained enabled
after clicking Reset button, causing confusion with bold icons.
Fixes#2984
Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
* Optimised `phone-` icons
* fix(site): remove studio link from navbar (#3166)
* Redraw handset to better align arcs still, and replace some with straight lines
* Align ring lines
---------
Co-authored-by: Jakob Guddas <github@jguddas.de>
* Changed resetStyle to reflect changes of button on absolutestrokewidth
* removed nextTick
---------
Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
* add columns-cog icon and metadata
* chore: rename columns-cog to columns-3-cog as per maintainer request
* added contributors from the icon this is based on
* Remove not existing category
---------
Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
* add electric truck icon
* update json file
* small change to svg
* update icon with zap in the middle
* move icon one pixel down to align with original truck icon
* use new truck as reference
* Update truck-electric.svg
* Update truck-electric.json
* Update truck-electric.svg
* Add contributor AnnaSasDev to truck-electric.json
---------
Co-authored-by: Jakob Guddas <github@jguddas.de>
Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
* Added icons: pathfinder (unite, minus, exclude, intersect)
* fix(icons): Altered pathfinder icon names to be more descriptive
* fix: Updated subtraction.svg to replace curves with of arcs
Co-authored-by: Jakob Guddas <github@jguddas.de>
* fix(icons): Updated names to be squares-* instead of shape-*
recomended by jguddas
* fix(shapes-unite): Arcified corners & added union tag
* fix(shapes-intersect): Replacing curves with arcs
Done by jguddas
* update(squares-exclude): added extra tags invert & xor
* fix(squares-intersect): Adjusted the look to make it more clear what it's use case is
* fix(icons): Accidentally swapped out the wrong icon for previous commit
* fix(squares-intersect): fixed filename
* fix(squares-exclude): Altered icon to look better under low resolution
Co-Authored-By: Jamie Law <956081+jamiemlaw@users.noreply.github.com>
* fix(squares-subtract): Updated name to fit naming convention better
Co-Authored-By: Jamie Law <956081+jamiemlaw@users.noreply.github.com>
* fix(sqaures-intersect): Removed certain curves for consistency
* fix(squares-exclude): Fixed arcs & arcified corners
Co-authored-by: Jakob Guddas <github@jguddas.de>
* fix(squares-exclude): icon was committed with wrong filename
* update(squares-exclude): updated design to be more readable
Co-Authored-By: Jakob Guddas <25524993+jguddas@users.noreply.github.com>
* fix(tags.json): Reverted accidental prettier alterations
* fix(squares-*.svg): enlarged squares to be more consistant
* fix(squares-*): added karsa-mistmere as a contributor
* fix(squares-subtract): fixed accidental copy made called squares-minus
* fix(squares-subtract): fixed rounding amount on some arcs
---------
Co-authored-by: Jakob Guddas <github@jguddas.de>
Co-authored-by: Jamie Law <956081+jamiemlaw@users.noreply.github.com>
Co-authored-by: Jakob Guddas <25524993+jguddas@users.noreply.github.com>
Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
* Add spline-pointer icon
* Add proper attribution to contributors
* Fix spline-pointer
* Reduce amount of tags and add tools category
* Run SVG to lucide studio
* add saudi riyal sign
* update name from sign to symbol
* fix stroke and fill issue
Co-authored-by: Jakob Guddas <github@jguddas.de>
* removed symbol from the name
---------
Co-authored-by: Jakob Guddas <github@jguddas.de>
Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
* Lucide svelte (#1)
* Update peerDependencies to support Svelte 5
* Bump svelte version
* Bump @testing-library/svelte version
* Remove alias in vitest.config.ts that causes tests to fail due to deprecated svelte/internal API
* Convert to svelte 5 syntax
* Bump vite & @sveltejs/vite-plugin-svelte version
* Fix error during render when children prop is missing & fix components being mounted on the server during tests
* Update test snapshots to reflect the differences in the html generated by svelte 5
* Convert class attribute to new array syntax with built-in clsx
* Convert export template to svelte 5 syntax
* Move svelte 5 to separate directory
* Update snapshots
* Update docs
* fix(icon): change variable declaration from let to const in Icon.svelte
* Lucide svelte (#1) (#2727)
* Update peerDependencies to support Svelte 5
* Bump svelte version
* Bump @testing-library/svelte version
* Remove alias in vitest.config.ts that causes tests to fail due to deprecated svelte/internal API
* Convert to svelte 5 syntax
* Bump vite & @sveltejs/vite-plugin-svelte version
* Fix error during render when children prop is missing & fix components being mounted on the server during tests
* Update test snapshots to reflect the differences in the html generated by svelte 5
* Convert class attribute to new array syntax with built-in clsx
* Convert export template to svelte 5 syntax
* Revert changes in lucide-svelte library
* Update package lock
* Update test files
* Formatting
* Update clean command
* Fix build
* Update packages
* update deps
* Fix export script
* Format code
* Revert version number change in package json
* Update workflows
---------
Co-authored-by: Aurélien Richard <56389380+aurelienrichard@users.noreply.github.com>
* adds border-radius
* Update and rename border-radius.svg to square-round-corner.svg
* Update and rename border-radius.json to square-round-corner.json
---------
Co-authored-by: Jakob Guddas <github@jguddas.de>
* feat(docs): Add deprecated badge for icons with deprecation status
* fix: resolve formatting issues in types.ts to pass Prettier checks
* Small adjustments
---------
Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
Before submitting an icon request check if it has already been requested. If there is an open request, please add a 👍.
**Important note**: No new brand logos are allowed, see https://github.com/lucide-icons/lucide/issues/670.
Existing brand icons will also be phased out. For brand icons, consider using https://simpleicons.org, which offers purpose-built SVGs that are also on a 24×24px grid.
> [!CAUTION]
> New brand logos are **not** allowed, see our official statement: https://github.com/lucide-icons/lucide/blob/main/BRAND_LOGOS_STATEMENT.md.
>
> Existing brand icons are being phased out. Consider using https://simpleicons.org, which offers purpose-built SVGs that are also on a 24×24px grid.
- type:input
id:name
attributes:
@@ -41,9 +43,9 @@ body:
required:true
- label:I have searched existing icons to make sure it does not already exist and I didn't find any.
required:true
- label:I am not requesting a brand logo and the art is not protected by copyright.
- label:I am not requesting a brand logo and the art is not protected by copyright, see more at https://github.com/lucide-icons/lucide/blob/main/BRAND_LOGOS_STATEMENT.md
required:true
- label:I am not requesting an icon that includes religious, political imagery or hate symbols.
- label:I am not requesting an icon that includes religious, war/violence related, political imagery or hate symbols.
required:true
- label:I have provided appropriate use cases for the icon(s) requested.
gh issue close ${{ github.event.issue.number }} --reason "not planned" --comment "This looks like a duplicate, use the [search](https://github.com/lucide-icons/lucide/issues?q=is%3Aissue+$PHRASE) to find similar issues.
Read more about brand guideline rules at [We're not accepting new Brand icons #670](https://github.com/lucide-icons/lucide/issues/670).
Read [our official statement about brand logos in Lucide](https://github.com/lucide-icons/lucide/blob/main/BRAND_LOGOS_STATEMENT.md).
Always happy to help on [Discord](https://discord.gg/EH6nSts)."
# Our Official Stance on Including Brand Logos in Lucide
## TL;DR
Lucide **does not accept** brand logos, and we do not plan to add them in the future.
This is due to a combination of **legal restrictions**, **design consistency concerns**, and **practical maintenance reasons**.
If you need brand logos, we recommend [Simple Icons](https://simpleicons.org/), which provides an extensive, legally safer collection of brand marks.
---
## 1. Historical Context
This is not a new debate — other icon sets have gone through the same discussion:
- **Material Design Icons** [deprecated all brand icons](https://github.com/Templarian/MaterialDesign/issues/6602) because they didn't fit the style, didn't work well in one color, and often looked out of place in a 24×24px grid.
- **Feather Icons** [came to the same conclusion](https://github.com/feathericons/feather/issues/763): brand logos have their own style, and forcing them into another inevitably leads to aesthetic compromises.
- **Lucide** learned from these examples — we'd rather focus on making a consistent set of non-brand icons that all work together.
## 2. Legal Considerations
Most brand logos:
- Are **protected by trademark or copyright**.
- Have **strict rules** for how they can be used (colors, spacing, proportions, etc.).
- **Don't allow modification** — but we'd have to change them to fit Lucide's style.
This means adding them could:
1. Break copyright or trademark law.
2. Make both you and the Lucide project legally responsible.
3. Force us to review every new request one by one for legal issues — something we simply can't do.
> **Note:** Simple Icons avoids this by keeping logos exactly as the brand provides them — though even they sometimes face [legal challenges](https://github.com/simple-icons/simple-icons/issues/11236).
## 3. Design & Consistency
Lucide is all about **visual consistency**.
Adding brand logos would:
- Break [our own design rules](https://lucide.dev/guide/design/icon-design-guide#icon-design-principles) for shapes, proportions, and stroke.
- Mix two fundamentally different categories of graphics (pictograms vs. corporate logos).
- Create a library where a subset of icons will always look "out of place".
If the logos are not in Lucide's style, why include them in Lucide at all? Better to use them from a dedicated brand icon source.
## 4. Maintenance Burden
Even with our current **"no brand icon requests"** policy, people still request them regularly.
Having any brand icons in the set:
- Makes people think we might add more in the future.
- Leads to repeated requests and the same conversations over and over.
- Wastes maintainer time redirecting people to the same explanation.
Removing them entirely solves this problem.
## 5. Recommended Alternatives
If you need brand icons, try:
- [Simple Icons](https://simpleicons.org/): offers a huge range of brands, in consistent SVG format, using a 24×24 viewBox, the same as ours.
- Official brand asset pages: most major companies provide downloadable SVGs.
You can use these alongside Lucide without bloating our core library.
## Final Words
Lucide is an **icon** set, not a **logo** set.
Logos belong in dedicated logo resources.
We're focusing on what Lucide does best: providing a clean, cohesive, and legally safe collection of open-source icons.
- __Make your commit messages as descriptive as possible.__ Include as much information as you can. Explain anything that the file diffs themselves won’t make apparent.
- __Document your pull request__. Explain your fix, link to the relevant issue, add screenshots when adding new icons.
- __Make sure the target of your pull request is the relevant branch__. Most of bugfix or new feature should go to the `main` branch.
- __Include only related work__. If your pull request has unrelated commit, it won't be accepted.
- __Make sure the target of your pull request is the relevant branch__. Most of bugfixes or new feature should go to the `main` branch.
- __Include only related work__. If your pull request has unrelated commits, it won't be accepted.
### Pull Requests Including Icons
### Icon Pull Requests
#### Guidelines
@@ -27,26 +27,30 @@ Please make sure you follow the icon guidelines, that should be followed to keep
Read it here: [ICON_GUIDELINES](https://lucide.dev/docs/icon-design-guide).
### Editor guides
#### Lucide Studio
For formatting and adjusting SVG icons, [@jguddas](https://github.com/jguddas) made a great tool called [Lucide Studio](https://studio.lucide.dev/). It is a web-based SVG editor that allows you to edit and adjust icons in the Lucide style. You can use it to create new icons or modify existing ones.
#### Editor guides
Here you can find instructions on how to implement the guidelines with different vector graphics editors:
If you want submit multiple icons, please separate the icons and group them. That makes reviewing the icons easier and keep the thread clean and scoped.
So don't submit multiple icons in one PR that have noting to do with each other.
If you want to submit multiple icons, please separate the icons and group them. That makes reviewing the icons easier and keeps the thread clean and scoped.
So don't submit multiple icons in one PR that have nothing to do with each other.
So for example don't create one PR with icons: `arrow-up`, `bicycle`, `arrow-down`.
Seperate them by two PRs; 'pr-01' `arrow`, `arrow-down` and 'pr-02' `bicycle`.
Separate them into two PRs; 'pr-01' `arrow`, `arrow-down` and 'pr-02' `bicycle`.
## Icon Requests
@@ -77,7 +81,7 @@ To distribute different packages we use [PNPM workspaces](https://pnpm.io/worksp
The configured directory for workspaces is the [packages](https://github.com/lucide-icons/lucide/tree/main/packages) directory, located in the root directory. There you will find all the current packages from lucide.
There are more workspaces defined, see [`pnpm-workspace.yaml`](https://github.com/lucide-icons/lucide/blob/main/pnpm-workspace.yaml).
> Note: One package is not managed by pnpm: **lucide-flutter**, this package is written in Dart and used pub for publishing.
> Note: One package is not managed by pnpm: **lucide-flutter**, this package is written in Dart and uses pub for publishing.
### Generated Code
@@ -127,7 +131,7 @@ When adding new features to for example the icon component for a framework. It i
### Local Testing
To test changes in a local project, you can use `yarn link`, `npm link`, `bun link` or `pnpm link` to link the package. Before you do this make sure you builded the package first.
To test changes in a local project, you can use `yarn link`, `npm link`, `bun link` or `pnpm link` to link the package. Before you do this make sure you've built the package first.
```sh
# in packages/lucide-react
@@ -157,6 +161,30 @@ lucide
The lucide.dev website is using [vitepress](https://vitepress.dev/) to generate the static website. The markdown files are located in the docs directory.
#### Running the Docs Website Locally
To test the docs website locally, follow these steps:
1.**Navigate to the docs directory**
```sh
cd docs
```
2.**Start the Local Development Server**
```sh
pnpm run docs:dev
```
3.**Open the Website Locally**
Vitepress should open with the following format:
VitePress dev server is running at:
- **Local**: `http://localhost:3000/`
- **Network**: `http://192.168.x.x:3000/`
### Guides
Detailed documentation about: installation, guides, packages, design guides etc.
All the icons of lucide in SVG format. These will be used as source for all the packages and other distributions for the lucide icons.
### packages
### Packages
Includes all the (npm) packages of lucide.
> Note: One package is not managed by pnpm: **lucide-flutter**, this package is written in Dart and used pub for publishing.
### Scripts
### scripts
Includes usefully scripts to automate certain jobs. Big part of the scripts is the template generation, for example it generates icon components for all the packages. These scripts are usually executed from the "scripts" section in the package.json.
Includes useful scripts to automate certain jobs. Big part of the scripts is the template generation, for example it generates icon components for all the packages. These scripts are usually executed from the "scripts" section in the package.json.
## Documentation
@@ -190,4 +216,4 @@ If you need any help or have problems with you contribution. Please don't hesita
Thank you to all the people who already contributed to Lucide!
Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2023 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2025.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
@@ -13,3 +13,27 @@ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
---
The MIT License (MIT) (for portions derived from Feather)
Copyright (c) 2013-2023 Cole Bemis
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
@@ -56,6 +57,12 @@ For more info on how to contribute please see the [contribution guidelines](http
Caught a mistake or want to contribute to the documentation? [Edit this page on Github](https://github.com/lucide-icons/lucide/blob/main/README.md)
## About brand logos
Lucide **does not accept** brand logos, and we do not plan to add them in the future. This is due to a combination of **legal restrictions**, **design consistency concerns**, and **practical maintenance reasons**.
[Click here to read our official statement about brand logos in Lucide.](./BRAND_LOGOS_STATEMENT.md)
## Community
Join the community on our [Discord](https://discord.gg/EH6nSts) server!
@@ -69,7 +76,9 @@ Lucide is totally free for commercial use and personal use, this software is lic
Thank you to all the people who contributed to Lucide!
Lucide is an open-source icon library that provides 1000+ vector (svg) files for displaying icons and symbols in digital and non-digital projects. The library aims to make it easier for designers and developers to incorporate icons into their projects by providing several official [packages](/packages) to make it easier to use these icons in your project.
Lucide is an open-source icon library that provides 1000+ vector (svg) files for displaying icons and symbols in digital and non-digital projects. The library aims to make it easier for designers and developers to incorporate icons into their projects by providing several official [packages](/packages).
## Available Icons
@@ -29,7 +29,8 @@ However, not everyone can understand them easily. Read more about [how to use Lu
## Official Packages
Lucide's official packages are designed to work on different platforms, making it easier for users to integrate icons into their projects. The packages are available for various technologies, including [Web (Vanilla)](https://lucide.dev/guide/packages/lucide), [React](https://lucide.dev/guide/packages/lucide-react), [React Native](https://lucide.dev/guide/packages/lucide-react-native), [Vue](https://lucide.dev/guide/packages/lucide-vue), [Vue 3](https://lucide.dev/guide/packages/lucide-vue-next), [Svelte](https://lucide.dev/guide/packages/lucide-svelte), [Preact](https://lucide.dev/guide/packages/lucide-preact), [Solid](https://lucide.dev/guide/packages/lucide-solid), [Angular](https://lucide.dev/guide/packages/lucide-angular), [NodeJS](https://lucide.dev/guide/packages/lucide-static#nodejs) and [Flutter](https://lucide.dev/guide/packages/lucide-flutter).
Lucide's official packages are designed to work on different platforms, making it easier for users to integrate icons into their projects. The packages are available for various technologies, including [Web (Vanilla)](https://lucide.dev/guide/packages/lucide), [React](https://lucide.dev/guide/packages/lucide-react), [React Native](https://lucide.dev/guide/packages/lucide-react-native), [Vue](https://lucide.dev/guide/packages/lucide-vue), [Vue 3](https://lucide.dev/guide/packages/lucide-vue-next), [Svelte](https://lucide.dev/guide/packages/lucide-svelte), [Preact](https://lucide.dev/guide/packages/lucide-preact), [Solid](https://lucide.dev/guide/packages/lucide-solid), [Angular](https://lucide.dev/guide/packages/lucide-angular), [Astro](https://lucide.dev/guide/packages/lucide-astro), and [NodeJS](https://lucide.dev/guide/packages/lucide-static#nodejs).
## Community
If you have any questions about Lucide, feel free to reach out to the community. You can find them on [GitHub](https://github.com/lucide-icons/lucide) and [Discord](https://discord.gg/EH6nSts).
For more details, see the [documentation](packages/lucide-preact.md).
## Astro
Implementation of the lucide icon library for Astro applications.
::: code-group
```sh [pnpm]
pnpm install @lucide/astro
```
```sh [yarn]
yarn add @lucide/astro
```
```sh [npm]
npm install @lucide/astro
```
```sh [bun]
bun add @lucide/astro
```
:::
For more details, see the [documentation](packages/lucide-astro.md).
## Static usage
Implementation of the lucide icon library for multiple usages that like to use: SVG files icons, SVG Sprite, Icon Fonts and static SVG strings export in Common JS modules (for NodeJS).
Implementation of the lucide icon library for Astro applications.
## Installation
::: code-group
```sh [pnpm]
pnpm add @lucide/astro
```
```sh [yarn]
yarn add @lucide/astro
```
```sh [npm]
npm install @lucide/astro
```
```sh [bun]
bun add @lucide/astro
```
:::
## How to use
Lucide is built with ES Modules, so it's completely tree-shakable.
Each icon can be imported as an Astro component, which renders an inline SVG element. This way, only the icons that are imported into your project are included in the final bundle. The rest of the icons are tree-shaken away.
### Example
Default usage:
```astro
---
import { Skull } from '@lucide/astro';
---
<Skull />
```
Additional props can be passed to adjust the icon:
```astro
---
import { Camera } from '@lucide/astro';
---
<Camera color="#ff3e98" />
```
For faster builds and load times, you can import icons directly from the `@lucide/astro/icons` directory:
```astro
---
import CircleAlert from '@lucide/astro/icons/circle-alert';
To customize the appearance of an icon, you can pass custom properties as props directly to the component. The component accepts all SVG attributes as props, which allows flexible styling of the SVG elements. See the list of SVG Presentation Attributes on [MDN](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/Presentation).
```astro
---
import { Phone } from '@lucide/astro';
---
<Phone fill="#333" />
```
This results a filled phone icon.
## Types
The package includes type definitions for all icons. This is useful if you want to dynamically render icons.
### Example
```astro
---
import { House, Library, Cog, type Icon as IconType } from '@lucide/astro';
type MenuItem = {
name: string;
href: string;
icon: typeof IconType;
};
const menuItems: MenuItem[] = [
{
name: 'Home',
href: '/',
icon: House,
},
{
name: 'Blog',
href: '/blog',
icon: Library,
},
{
name: 'Projects',
href: '/projects',
icon: Cog,
},
];
---
{
menuItems.map((item) => (
<a href={item.href}>
<item.icon />
<span>{item.name}</span>
</a>
))
}
```
## With Lucide lab or custom icons
[Lucide lab](https://github.com/lucide-icons/lucide-lab) is a collection of icons that are not part of the Lucide main library.
They can be used by using the `Icon` component.
All props of the regular Lucide icons can be passed to adjust the icon appearance.
### Using the `Icon` component
This creates a single icon based on the iconNode passed and renders a Lucide icon component.
```astro
---
import { Icon } from '@lucide/astro';
import { burger, sausage } from '@lucide/lab';
---
<Icon iconNode={burger} />
<Icon iconNode={sausage} color="red"/>
```
## One generic icon component
It is possible to create one generic icon component to load icons, but it is not recommended.
::: danger
The example below imports all ES Modules, so exercise caution when using it. Importing all icons will significantly increase the build size of the application. This may be passable if you're doing SSG and SSR in server environments. However if you're doing SSR in serverless environments, it could negatively affect your app's performance, as a bigger bundle size will translate to an increase in cold starts.
:::
### Icon Component Example
```astro
---
import { icons, type IconProps } from '@lucide/astro';
@@ -78,17 +78,16 @@ This creates a single icon based on the iconNode passed and renders a Lucide ico
```jsx
import { Icon } from 'lucide-react';
import { burger } from '@lucide/lab';
import { coconut } from '@lucide/lab';
const App = () => (
<Icon iconNode={burger} />
<Icon iconNode={coconut} />
);
```
## Dynamic Icon Component
It is possible to create one generic icon component to load icons, but it is not recommended.
Since it is importing all icons during build. This increases build time and the different modules it will create.
It is possible to create one generic icon component to load icons. But it is not recommended, since it is importing all icons during the build. This increases build time and the different modules it will create.
`DynamicIcon` is useful for applications that want to show icons dynamically by icon name. For example, when using a content management system with where icon names are stored in a database.
This package include the following lucide implementations:
This package includes the following implementations of Lucide icons:
-All SVG files
-Individual SVG files
- SVG sprite
- Icon fonts
- JavaScript library containing strings of SVGs.
- Icon font files
- A JavaScript library exporting SVG strings
## Why lucide-static?
## Who is this for?
This package is suitable for specific use cases, for example if you want to use icon fonts, SVG sprites, normal SVGs or Common.js SVG strings in your javascript project.
`lucide-static` is suitable for _very specific use cases_ where you want to use Lucide icons without relying on a JavaScript framework or component system. It's ideal for:
::: warning
While they can be useful for prototyping, it is not recommended to use the SVG sprites or icon fonts provided by this package in production web apps as all the available icons are included in the app, hence increasing loading time and data usage. We recommend to use a bundler and tree-shaking to make sure only the icons you use are bundled with your app. Tree-shaking is only available in these packages: [lucide](lucide), [lucide-react](lucide-react), [lucide-vue](lucide-vue), [lucide-vue-next](lucide-vue-next), [lucide-angular](lucide-angular), [lucide-preact](lucide-preact)
- Projects that use icon fonts with plain CSS or utility-first frameworks
- Embedding raw SVG files or sprites directly in HTML
- Using SVGs as CSS background images
- Importing SVG strings into Node.js (CommonJS) environments
::: danger
### Not recommended for production {#production-warning}
SVG sprites and icon fonts include **all icons**, which can significantly increase your app's bundle size and load time.
For production environments, we recommend using a bundler with tree-shaking support to include only the icons you actually use. Consider using:
Once included, use the format `icon-{kebab-case-name}`. You can copy icon names from the [Lucide Icons page](https://lucide.dev/icons).
```html
<div class="icon-house"></div>
```
### Node.js
If you're not using a package manager, you can download the font files directly from the [latest release](https://github.com/lucide-icons/lucide/releases/latest).
To use lucide icons in your Nodejs project you can import each icon as:
@@ -7,22 +7,22 @@ Implementation of the lucide icon library for svelte applications.
::: code-group
```sh [pnpm]
pnpm add lucide-svelte
pnpm add @lucide/svelte
```
```sh [yarn]
yarn add lucide-svelte
yarn add @lucide/svelte
```
```sh [npm]
npm install lucide-svelte
npm install @lucide/svelte
```
```sh [bun]
bun add lucide-svelte
bun add @lucide/svelte
```
:::
> `@lucide/svelte` is only for Svelte 5, for Svelte 4 use the `lucide-svelte` package.
## How to use
@@ -36,7 +36,7 @@ Default usage:
```svelte
<script>
import { Skull } from 'lucide-svelte';
import { Skull } from '@lucide/svelte';
</script>
<Skull />
@@ -46,17 +46,17 @@ Additional props can be passed to adjust the icon:
```svelte
<script>
import { Camera } from 'lucide-svelte';
import { Camera } from '@lucide/svelte';
</script>
<Camera color="#ff3e98" />
```
For faster builds and load times, you can import icons directly from the `lucide-svelte/icons` directory:
For faster builds and load times, you can import icons directly from the `@lucide/svelte/icons` directory:
```svelte
<script>
import CircleAlert from 'lucide-svelte/icons/circle-alert';
import CircleAlert from '@lucide/svelte/icons/circle-alert';
</script>
<CircleAlert color="#ff3e98" />
@@ -77,7 +77,7 @@ To customize the appearance of an icon, you can pass custom properties as props
```svelte
<script>
import { Phone } from 'lucide-svelte';
import { Phone } from '@lucide/svelte';
</script>
<Phone fill="#333" />
@@ -91,101 +91,140 @@ The package includes type definitions for all icons. This is useful if you want
### TypeScript Example
#### Svelte 4
::: code-group
```svelte
```svelte [Svelte 5]
<script lang="ts">
import { Home, Library, Cog, type Icon } from 'lucide-svelte';
import type { ComponentType } from 'svelte';
import { Home, Library, Cog, type Icon as IconType } from '@lucide/svelte';
type MenuItem = {
name: string;
href: string;
icon: ComponentType<Icon>;
};
type MenuItem = {
name: string;
href: string;
icon: typeof IconType;
};
const menuItems: MenuItem[] = [
{
name: 'Home',
href: '/',
icon: Home
},
{
name: 'Blog',
href: '/blog',
icon: Library
},
{
name: 'Projects',
href: '/projects',
icon: Cog
}
];
const menuItems: MenuItem[] = [
{
name: 'Home',
href: '/',
icon: Home
},
{
name: 'Blog',
href: '/blog',
icon: Library
},
{
name: 'Projects',
href: '/projects',
icon: Cog
}
];
</script>
{#each menuItems as item}
<a href={item.href}>
<svelte:component this={item.icon} />
<span>{item.name}</span>
</a>
{@const Icon = item.icon}
<a href={item.href}>
<Icon />
<span>{item.name}</span>
</a>
{/each}
```
#### Svelte 5
Some changes are required since Svelte 5 [deprecates](https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes-Component-typing-changes) the `ComponentType` typescript type.
```svelte
```svelte [Svelte 4]
<script lang="ts">
import { Home, Library, Cog, type Icon as IconType } from 'lucide-svelte';
import { Home, Library, Cog, type Icon } from '@lucide/svelte';
import type { ComponentType } from 'svelte';
type MenuItem = {
name: string;
href: string;
icon: typeof IconType;
};
type MenuItem = {
name: string;
href: string;
icon: ComponentType<Icon>;
};
const menuItems: MenuItem[] = [
{
name: 'Home',
href: '/',
icon: Home
},
{
name: 'Blog',
href: '/blog',
icon: Library
},
{
name: 'Projects',
href: '/projects',
icon: Cog
}
];
const menuItems: MenuItem[] = [
{
name: 'Home',
href: '/',
icon: Home
},
{
name: 'Blog',
href: '/blog',
icon: Library
},
{
name: 'Projects',
href: '/projects',
icon: Cog
}
];
</script>
{#each menuItems as item}
{@const Icon = item.icon}
<a href={item.href}>
<Icon />
<span>{item.name}</span>
</a>
{@const Icon = item.icon}
<a href={item.href}>
<Icon />
<span>{item.name}</span>
</a>
{/each}
```
:::
### JSDoc Example
#### Svelte 4
::: code-group
```svelte
```svelte [Svelte 5]
<script>
import { Home, Library, Cog } from 'lucide-svelte';
import { Home, Library, Cog } from '@lucide/svelte';
For more details about typing the `svelte:component` directive, see the [Svelte documentation](https://svelte.dev/docs/typescript#types-componenttype).
@@ -275,11 +273,11 @@ This creates a single icon based on the iconNode passed and renders a Lucide ico
```svelte
<script>
import { Icon } from 'lucide-svelte';
import { burger, sausage } from '@lucide/lab';
import { Icon } from '@lucide/svelte';
import { pear, sausage } from '@lucide/lab';
</script>
<Icon iconNode={burger} />
<Icon iconNode={pear} />
<Icon iconNode={sausage} color="red"/>
```
@@ -293,29 +291,29 @@ The example below imports all ES Modules, so exercise caution when using it. Imp
In the `createIcons` function you can pass some extra parameters to adjust the `nameAttr` or add custom attributes like for example classes.
In the `createIcons` function you can pass some extra parameters:
- you can pass `nameAttr` to adjust the attribute name to replace for
- you can pass `attrs` to pass additional custom attributes, for instance CSS classes or stroke options.
- you can pass `root` to provide a custom DOM element the icons should be replaced in (useful when manipulating small sections of a large DOM or elements in the shadow DOM)
- you can pass `inTemplates: true` to also replace icons inside `<template>` tags.
Here is a full example:
@@ -101,7 +106,9 @@ createIcons({
'stroke-width': 1,
stroke: '#333'
},
nameAttr: 'data-lucide' // attribute for the icon name.
nameAttr: 'data-lucide', // attribute for the icon name.
root: element, // DOM element to replace icons in.
inTemplates: true // Also replace icons inside <template> tags.
});
```
@@ -119,6 +126,34 @@ createIcons({
});
```
### Custom Document root
Apply icons in a custom root element, for instance a shadow DOM root.
```js
import { createIcons } from 'lucide';
// Custom root element, for instance a shadow DOM root.
@@ -2,6 +2,7 @@ import copy from 'rollup-plugin-copy';
importreplacefrom'@rollup/plugin-replace';
exportdefaultdefineNitroConfig({
compatibilityDate:'2025-07-30',
preset:'vercel_edge',
srcDir:'.vitepress',
routeRules:{
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.