Compare commits

...

138 Commits

Author SHA1 Message Date
Eric Fennis
3648e02992 Add cooking-pot icon (#1737)
Co-authored-by: Guillermo Angeles <guillermo.angeles@adoptaunabuelo.com>
2023-12-22 13:53:26 +01:00
Wojciech Maj
64504da1cd Add more tags (#1734) 2023-12-21 14:18:35 +01:00
Daniel Bayley
e166ba4e80 Add materials icons (#1407)
* Add `fence` icon

* Add `anvil` (metal) icon

* Add `brick-wall` icon

* Refine `anvil` icon

* Update icons/anvil.json

Co-authored-by: Karsa <contact@karsa.org>

* Update icons/brick-wall.json

Co-authored-by: Karsa <contact@karsa.org>

* Add `panel` icon

* Refine `brick-wall` icon

* Rename `panel` to `inspection-panel`

---------

Co-authored-by: Karsa <contact@karsa.org>
Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2023-12-20 09:08:50 +01:00
Wojciech Maj
1123214b13 Add support for react-native-svg ^14.0.0 (#1732)
Closes #1722
2023-12-19 22:59:59 +01:00
Eric Fennis
4140ba5612 bumping up packages (#1728) 2023-12-18 12:04:42 +01:00
Jakob Guddas
019f38281c chore: pull-request workflow refactor (#1729)
* chore: pull-request workflow refactor

* chore: pull-request workflow refactor

* chore: pull-request workflow refactor
2023-12-18 11:03:17 +01:00
Bhargav Shirin Nalamati
633595d1c1 Update README.md (#1653) 2023-12-16 16:34:28 +01:00
Daniel Bayley
df58c3ff2f Add fire/safety/security/amenities icons (#1392)
* Add `fire-extinguisher` icon

* Add `smoke-alarm` icon

* Improve fire related metadata

* Add `fire-alarm` icon

* Add `cctv` icon

* Add `cctv-off` icon

* Update icons/fire-alarm.json

Co-authored-by: Karsa <contact@karsa.org>

* Update icons/fire-alarm.json

Co-authored-by: Karsa <contact@karsa.org>

* Rename `fire-alarm` to `bell-alarm`

* Refine `cctv` icons

* Optimise `bell-alarm` icon

* Rename `bell-alarm` to `bell-electric`

* Rename `smoke-alarm` to `alarm-smoke`

* Refine `alarm-smoke` icon

* Refine `cctv` icons

* Update icons/alarm-smoke.svg

Co-authored-by: Karsa <contact@karsa.org>

* Update icons/cctv.svg

Co-authored-by: Karsa <contact@karsa.org>

* Update icons/fire-extinguisher.svg

Co-authored-by: Karsa <contact@karsa.org>

* update pr workflow

* update pr workflow

* add env

* remove cctv off icons

---------

Co-authored-by: Karsa <contact@karsa.org>
Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2023-12-16 15:39:40 +01:00
Jakob Guddas
e7abba5273 feat: added renameIcon script (#1630)
* feat: added renameIcon script

* feat: added renameIcon script

* chore: converted renameIcon.sh to mjs

* refactor: cleanup

* Delete scripts/renameIcon.sh
2023-12-16 15:20:08 +01:00
Eric Fennis
2693da38d3 fix: update pr workflow 2023-12-15 16:31:19 +01:00
Jakob Guddas
ab59a1ec36 feat: added pointer-off icon (#1567) 2023-12-15 14:18:47 +01:00
Jakob Guddas
315c020279 Add squircle (#1293)
* Add `squircle`

* Create squircle.json

* Update squircle.svg

* Update icons/squircle.json

* Update squircle.json

* Update squircle.json

---------

Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2023-12-15 13:48:36 +01:00
James Vickery
494f7953c8 New icons: user-search and user-round-search (#1620)
* user-search and user-search-2 icons

* updated user-search icons

* Update icons/user-search.json

Co-authored-by: Jakob Guddas <github@jguddas.de>

* Update icons/user-search-2.json

Co-authored-by: Jakob Guddas <github@jguddas.de>

* Renamed user-search-2 to user-round-search.

---------

Co-authored-by: Jakob Guddas <github@jguddas.de>
Co-authored-by: Karsa <contact@karsa.org>
2023-12-15 12:21:07 +01:00
Eric Fennis
a5ea3a5368 Set fail-fast: false, release workflow 2023-12-15 12:20:22 +01:00
Daniel Bayley
6486f76c55 Fix missing contributors (#1706) 2023-12-15 11:09:52 +01:00
Eric Fennis
e32db96f1f update workflow 2023-12-13 22:44:08 +01:00
Eric Fennis
73f70c885a Update pull-request.yml 2023-12-13 22:28:05 +01:00
Daniel Bayley
14c7ea8e13 Refine/add message[-*] icons (#1208)
* Add `message-square-warning` icon

* Optimise `message-square-plus` icon

* Add `message-square-diff` (request changes) icon

* Refine `message-circle` icon

* Add `message-circle-question` icon

* Add `message-circle-warning` icon

* Add `message-square-x` icon

* Add `message-square-off` icon

* Add `message-circle-plus` icon

* Add `message-circle-x` icon

* Add `message-circle-off` icon

* Refine `message-circle` icons

* Fix `message-circle-question` mark

* Fix `message-square-diff` icon

* Add `message-square-share` icon

* Add `message-square-text` icon

* Refine `message-square-x` icon

* Add `message-square-code` icon

* Improve `message-*` icons metadata

* Add `message-square-more` icon

* Improve `more-horizontal` metadata

* Add `message-circle-more` icon

* Add `message-circle-dashed` icon

* Add `message-square-text-quote` icon

* Add `message-square-quote` icon

* Add `message-square-reply` icon

* Add `message-circle-code` icon

* Add `message-circle-reply` icon

* Add `message-circle-heart` icon

* Add `message-square-heart` icon

* Add `message-square-dot` (unread) icon

* Add `message-square-dot-big` (unread/notification) variant

* Remove message-square-text-quote and rename message-square-dot-big

* Added as contributor in meta data

---------

Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2023-12-13 21:14:49 +01:00
Eric Fennis
9fc7653dc1 Add carbon to site 2023-12-13 20:45:25 +01:00
Jakob Guddas
2b007e7962 Lessened $schema type strictness (#1718)
* Lessened $schema type strictness

* Lessened $schema type strictness
2023-12-11 15:53:52 +01:00
dependabot[bot]
bb1e470f3a Bump vite from 4.4.7 to 4.4.12 (#1714)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 4.4.7 to 4.4.12.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v4.4.12/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v4.4.12/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-08 10:55:14 +01:00
Eric Fennis
4a1e6bbfa5 Update site dependencies & small fixes (#1699)
* update styling

* Update vitepress
2023-11-28 21:02:23 +01:00
Gionata Mettifogo
e5ee997566 Update README.md (#1704)
The readme lists the url below with uppercase L
@import ('~lucide-static/font/Lucide.css');

but the file in node_modules/lucide-static/font has a lowercase L making it fail on certain loaders like the one used by Storybook on MacOS.

The fix is simply to use lowercase
2023-11-28 21:00:46 +01:00
Daniel Bayley
27c0a136cd Add music/piano/keyboard/guitar/pick/amp/drum/album/audio/waveform icons (#1124)
* Add `piano` icon

* Add `keyboard-music` icon

* Optimise `speaker` icon

* Refine `speaker` icon

* Improve metadata

* Add `guitar` icon

* Add `guitar-pick` icon

* Add `guitar-amp` icon

* Add `drum` icon

* Add `disc-album` icon

* Add `disc-album-remove` icon

* Add `disc-album` variant

* Add `file-music` icon

* Add `audio-waveform` icon

* Add `audio-lines` icon

* Refine `speaker` icon

* Remove icons

---------

Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2023-11-28 21:00:08 +01:00
Sukomal Dutta
84b3c46b65 remove extra space in svg class attribute (#1703)
* remove extra space in svg class attribute

* Update packages/lucide-react/src/createLucideIcon.ts

Co-authored-by: Jakob Guddas <github@jguddas.de>

---------

Co-authored-by: Jakob Guddas <github@jguddas.de>
2023-11-28 20:59:37 +01:00
James Vickery
1a09e7fb39 Renamed user-*-2 to user-round-* (#1638)
* Renamed user-*-2 to user-round-*

* Added user-round icon optimizations as per Discord + renamed user*-(square|circle) to (square|circle)-user* also as per Discord

---------

Co-authored-by: Karsa <contact@karsa.org>
Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2023-11-24 13:59:28 +01:00
Eric Fennis
75e9724072 Make sure we apply all classes to the lucide icons (#1691)
* Make sure all classes are applied for all packages

* Add class test to angular component

* Adjust lucide-static tests

* update snapshot

* Fix types
2023-11-24 13:59:12 +01:00
Eric Fennis
fbaccc7d9f Fix lint errors svg files (#1698) 2023-11-24 11:22:05 +01:00
Zakher Masri
c24bc4d7ef Fixed Illustrator template link + fixed typo (#1664)
* Fixed Illustrator template link + fixed typo

* Added `pilcrow-left` icon

* Revert "Added `pilcrow-left` icon"

This reverts commit 6ccdf9c55e.
2023-11-24 11:08:57 +01:00
Otto Coster
5c8c8f4362 Support Angular 17 (#1696) 2023-11-24 11:07:49 +01:00
Daniel Bayley
ffd2a62941 Improve Adobe Illustrator template (#1689) 2023-11-24 09:19:02 +01:00
Eric Fennis
e77959e1a6 lucide-vue Deprecation warning (#1663)
* Add Vue deprecation warning

* Add deprecation warning docs page

* Fix typo

* Update warning text
2023-11-24 08:14:47 +01:00
Eric Fennis
149ee36e61 Improve license notice in packages (#1657)
* Improve license message

* Implement license notice in lucide-static

* Tighten package PR workflows

* Update lockfile
2023-11-17 11:12:31 +01:00
Karsa
88bf60b5d7 Update Angular logo on site (#1684) 2023-11-17 11:11:26 +01:00
Jakob Guddas
1e5df716a4 feat: added curve handles to svg preview (#1661) 2023-11-13 21:18:51 +01:00
Karsa
fc0ea760e5 Fixes #1665 (#1674)
Replace Do with Don't in Pixel perfection bad example.
2023-11-09 16:27:59 +01:00
Jakob Guddas
c85275899a Renamed alarm-check to alarm-clock-check (#1628) 2023-11-06 11:00:44 +01:00
Eric Fennis
288edde1ea Linting SVG files (#1642)
* eslint rules for SVGS

* apply options

* Add typescript eslinter

* Make eslint work with the codebase

* Format icons

* Test svg

* Add workflow

* Fix lint command

* Revert duplicated aliases

* Update .eslintrc.js

Co-authored-by: Jakob Guddas <github@jguddas.de>

* Update .eslintrc.js

Co-authored-by: Jakob Guddas <github@jguddas.de>

* Move linter to separate workflow

* Add pnpm install

* Revert icon changes

* Test eslint workflow

* turn of fail lint-contributors

* Revert theater

* process feedback

---------

Co-authored-by: Jakob Guddas <github@jguddas.de>
2023-11-06 11:00:04 +01:00
Karsa
207ff6c487 Adds ribbon (#1438)
* Adds ribbon

* Update icons/ribbon.svg

Co-authored-by: Jakob Guddas <github@jguddas.de>

---------

Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
Co-authored-by: Jakob Guddas <github@jguddas.de>
2023-11-03 08:49:20 +01:00
Sukomal Dutta
a1a9a4d839 fix export IconNode type (#1656)
* fix export IconNode type

* add Types exports
2023-11-01 15:53:17 +01:00
Karsa
c5804ad9a5 Refactored icon exports to use the new proposed icon node format. (#1641) 2023-10-31 21:03:39 +01:00
Jakob Guddas
c72fb4a28b feat: changed backdrop color for new icons in group to gray (#1640) 2023-10-31 21:03:17 +01:00
Jakob Guddas
da5ad547b5 feat: improved backdrop group name resolution (#1645) 2023-10-31 21:02:35 +01:00
Daniel Bayley
66cfe527b3 Optimise/add missing check[-*] icon/s (#1297)
* Optimise `check`[`-*`] icons

* Add missing `check-square` variant
2023-10-31 19:54:25 +01:00
Karsa
d1866225ba Fixes radiation center dot (#1655) 2023-10-31 07:13:25 +01:00
Jakob Guddas
372735999f fix: exclude renames from contributor generation (#1643)
* fix: exclude renames from contributor generation

* fix: exclude renames from contributor generation
2023-10-30 21:31:25 +01:00
Jakob Guddas
f3a33346dd Fixed gaps in cake icon (#1651)
* Fixed gaps in `cake` icon

* Update cake.json

* Update icons/cake.svg

Co-authored-by: Karsa <contact@karsa.org>

---------

Co-authored-by: Karsa <contact@karsa.org>
2023-10-30 20:13:21 +01:00
Jakob Guddas
3373acf596 Rebuild tree-deciduous using arcs (#1647)
* Rebuild tree-deciduous using arcs

* Update icons/tree-deciduous.svg

Co-authored-by: Karsa <contact@karsa.org>

---------

Co-authored-by: Karsa <contact@karsa.org>
2023-10-30 20:11:40 +01:00
Eric Fennis
73d5bfc318 Fix icon contributors 2023-10-29 21:09:08 +01:00
ayushrakesh
ddbc074aa3 Update README.md (#1652) 2023-10-29 18:47:00 +01:00
Jakob Guddas
8f4d6b1651 feat: added lint-contributors job (#1625)
* feat: added lint-contributors job

Signed-off-by: Jakob Guddas <github@jguddas.de>

* feat: improved lint-contributors job

Signed-off-by: Jakob Guddas <github@jguddas.de>

* feat: add comments to lint-contributors job

Signed-off-by: Jakob Guddas <github@jguddas.de>

---------

Signed-off-by: Jakob Guddas <github@jguddas.de>
2023-10-27 08:59:27 +02:00
Daniel Bayley
d8b08f8fda Add missing git icons (#995)
* Add `git-pull-request-create` icon

* Add `git-pull-request-create-arrow` variant

* Improve `git-*` icons metadata

* Optimise `git-pull-request-closed` icon

* Refine `git-fork` icon

…to match [`network`](https://lucide.dev/icons/network)

* Add `git-graph` icon

* Rename `git-commit` to `git-commit-horizontal`

* Add `git-commit-vertical` icon

* Add `git-pull-request-arrow` icon

* Add `git-compare-arrows` icon
2023-10-27 08:56:26 +02:00
Daniel Bayley
fddacb6260 Optimise/add power[-circle/-square] icons (#1353)
* Add `power-circle` icon

* Optimise `power` icon

* Improve `power` icon metadata

* Add `power-square` icon

---------

Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2023-10-23 21:35:57 +02:00
Sun Xiaoran
3d0c8691c9 fix: jsx type for icons in vue 3 (#1617) 2023-10-23 21:24:05 +02:00
Jakob Guddas
47998b05aa feat: added linting and formatting of icon and category json files (#1632) 2023-10-23 21:05:02 +02:00
Sukomal Dutta
9a9e051343 correct typo in icon size example (#1634) 2023-10-23 21:02:05 +02:00
Jakob Guddas
6c6c8448fa fix: duplicate Next.js aliases (#1631) 2023-10-22 13:06:07 +02:00
Eric Fennis
49445aad3a Showcase page for the website (#1604)
* add showcase items

* Add showcase cards

* Complete showcase list

* Add light/dark mode versions
2023-10-20 13:45:47 +02:00
Jakob Guddas
70656eb4f0 Optimized armchair icon (#1610) 2023-10-20 11:38:03 +02:00
Sukomal Dutta
930f862547 fix website jumping isuue (#1612)
Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2023-10-20 11:36:53 +02:00
Eric Fennis
931b7f5376 Add pnpm action 2023-10-20 11:19:48 +02:00
Jakob Guddas
81e44bdc40 feat: improved folder cohesion (#1223)
* feat: improved folders

* fix: snapped node

* Update icons/folder-heart.svg

Co-authored-by: Karsa <contact@karsa.org>

* Update folder-cog-2.svg

* Update folder-cog.svg

* feat: revert folder-symlink

* feat: revert folder-output

---------

Co-authored-by: Karsa <contact@karsa.org>
2023-10-20 09:27:48 +02:00
Parikshit Adhikari
e6e90944b9 typo fixed (#1621) 2023-10-19 17:17:06 +02:00
Eric Fennis
f6fd369bfe Github Actions cleanup - Use setup node for pnpm cache (#1616)
* Switch setup node for pnpm cache

* Test workflows

* Add pnpm setup back again
2023-10-18 09:50:18 +02:00
Eric Fennis
bbf183fe48 Fix lock file 2023-10-17 21:43:34 +02:00
Daniel Bayley
4f5642b872 Add book-* icons (#1352)
* Add `book-text` icon

* Add `book-open-text` icon

* Add `book-a` (dictionary) icon

* Improve `book`/`contact` icons metadata

* Add `book-check` (read) icon

* Add `book-type` (font book) icon

* Add `book-spine` icon

* Add `book-elastic` icon

* Add `book-user` (contacts) icon

* Add `book-address-user` (contacts variant) icon

* Add `book-address` (contacts variant) icon

* Add `book-heart` (diary/journal) icon

* Improve `book-*` icons metadata

* Add `book-image` icon

* Add `library-big` icon

* Improve metadata

* Rename `book-address`[`-*`] icons to `book-tabs`[`-*`]

* Improve metadata

* Add `notebook` icon

* Add `notebook-tabs` (contacts variant) icon

* Add `notebook-text` icon

* Add `notebook-elastic` icon

* Add `notebook-pencil` icon

* Add `notepad-text` (`notebook` variant) icon

* Add `notepad-lines` icon

* Refine `library-big` icon

Remove detail.

* Update icons/book-heart.json

Co-authored-by: Jakob Guddas <github@jguddas.de>

* Refine `book-tabs` icon

* Remove `book-tabs-user` icon

* Improve `book` icons metadata

* Move `note`[`book`/`pad`] icons

* Add `book-volume` (audiobook) icon

* Add `book-headphones` (audiobook variant) icon

* Add `book-audio` variant icon

* Add `library-square` icon

* Add `book-open` variant

* Rename `book-template` to `book-dashed`

* Add `book-git-commit` icon

* Delete icons/book-elastic.json

* Delete icons/book-elastic.svg

* Delete icons/book-git-commit.json

* Delete icons/book-git-commit.svg

* Delete icons/book-open-2.json

* Delete icons/book-open-2.svg

* Delete icons/book-spine.json

* Delete icons/book-spine.svg

* Delete icons/book-tabs.json

* Delete icons/book-tabs.svg

* Delete icons/book-volume.json

* Delete icons/book-volume.svg

---------

Co-authored-by: Jakob Guddas <github@jguddas.de>
Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2023-10-17 21:38:27 +02:00
Emma Alexia
1dce6a141a fix/docs: release tags don't work for newly-created/updated icons (#1589)
As per 3391b5b717, the format of new GitHub release tags is just the version number without the `v` prefix. As we can see on https://github.com/lucide-icons/lucide/releases?page=2, versions older than 0.266.0 use a `v` prefix. The current docs assume that all versions contain the `v` prefix; this PR fixes it so that the format of versions both from before and after this change are accounted for.
2023-10-17 21:30:26 +02:00
Eric Fennis
dbfce919fc Alias support for lucide package (#1592)
* Setup aliases for lucide

* Make aliases work for lucide package
2023-10-17 21:27:46 +02:00
Jakob Guddas
52adb78df8 Optimized globe (#1606) 2023-10-17 21:26:47 +02:00
Jan
c5cfbed28c add info about dynamic imports to nextjs docs (#1564)
* add info about dynamic imports to nextjs docs

* remove warning
2023-10-17 21:25:49 +02:00
Jakob Guddas
1e4fd13852 Optimized backpack icon (#1611) 2023-10-17 21:11:44 +02:00
Eric Fennis
0a0fd1cf6c Adds new font in lucide-static and speed up icon outlining (#1599)
* Apply new icon font build in release

* remove dockerfile
2023-10-16 22:03:57 +02:00
dependabot[bot]
487d03fc4d Bump undici from 5.24.0 to 5.26.3 (#1615)
Bumps [undici](https://github.com/nodejs/undici) from 5.24.0 to 5.26.3.
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](https://github.com/nodejs/undici/compare/v5.24.0...v5.26.3)

---
updated-dependencies:
- dependency-name: undici
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-16 21:43:56 +02:00
Karsa
950160ad5a Fixes some over-optimisation done in #1573 (#1605) 2023-10-13 17:15:24 +02:00
Eric Fennis
b6f5898aee Remove lucide flutter form the main repo (#1593) 2023-10-13 14:33:45 +02:00
Sukomal Dutta
a9c1dca801 fix #1579 issue added debounced in search (#1600)
* add debounced in search

* updated iconsCategoryOverview

* fix site loading issue

* apply suggestion
2023-10-13 14:32:34 +02:00
Jakob Guddas
c05c7e333f feat: added umbrella-off icon (#1568)
* feat: added umbrella-off icon

* Update umbrella-off.svg

* Update umbrella-off.svg

* Update umbrella-off.svg

* Update icons/umbrella-off.json
2023-10-12 08:36:17 +02:00
Jakob Guddas
dff42fe326 fix: gh-icon improvements (#1595) 2023-10-11 13:21:42 +02:00
Daniel Bayley
c1f642e20f Add navigation icons (#1390)
* Add `signpost` icon

* Add `signpost-big` icon

* Improve `milestone` metadata

* Add `map-pinned` icon

* Add `waypoints` icon

* Add `route` (journey/planner) icon

* Add `route-off` (clear journey) icon

* Refine `map-pinned` icon

* Refine `map-pinned` icon
2023-10-10 08:38:37 +02:00
Jakob Guddas
cf9565b69c feat: added image-down icon (#1570) 2023-10-05 22:39:32 +02:00
Daniel Bayley
4cc4468d2f Add camping icons (#1409)
* Add `caravan` icon

* Improve `tent` metadata

* Rename `tent` to `tipi`

* Add `tent-tree` (camping) icon

* Add `flame-kindling` (campfire) icon

* Refine `tipi` icon

* Refine `tent-tree` icon

* Revert rename `tipi` to `tent`

* Refine `caravan` icon

* Refine `tent` icon

* Fix `flame-kindling` optimisation

* Update flame-kindling.svg

---------

Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2023-10-03 09:53:21 +02:00
Daniel Bayley
fd9ab8f17a Add barcode/scan icons/optimise/improve metadata (#1354)
* Add `barcode` icon

* Add `scan-barcode` icon

* Add `scan-text` icon

* Improve `scan` icons metadata

* Add `scan-eye` icon

* Add `scan-search` icon

* Optimise `scan-line` icon

* Add `fullscreen` icon

---------

Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2023-10-03 09:35:20 +02:00
Eric Fennis
c9101f0f39 Add Lucide basics guide on site (#1521)
* add sidebar topics

* Start with styling icons doc

* write some doc text

* add sandpack

* Add custom sandpack theme

* Adjust sandpack

* update sidebar

* Add example

* Add more examples

* updat lockfile

* update vitepress

* Fix sidebar

* Adjust theme with latest vitepress!

* Example updates!

* Finish last examples

* Remove markdown comments

* Update docs/guide/advanced/filled-icons.md

Co-authored-by: Jakob Guddas <github@jguddas.de>

* Update docs/guide/basics/color.md

Co-authored-by: Jakob Guddas <github@jguddas.de>

* Update docs/guide/basics/color.md

Co-authored-by: Jakob Guddas <github@jguddas.de>

* Update docs/guide/basics/stroke-width.md

Co-authored-by: Jakob Guddas <github@jguddas.de>

* Update docs/guide/basics/color.md

Co-authored-by: Jakob Guddas <github@jguddas.de>

* Update docs/guide/basics/sizing.md

Co-authored-by: Jakob Guddas <github@jguddas.de>

* Update docs/guide/basics/stroke-width.md

Co-authored-by: Jakob Guddas <github@jguddas.de>

* Update docs/guide/basics/stroke-width.md

Co-authored-by: Jakob Guddas <github@jguddas.de>

* Update docs/guide/basics/color.md

Co-authored-by: Jakob Guddas <github@jguddas.de>

* Update docs/guide/basics/color.md

Co-authored-by: Jakob Guddas <github@jguddas.de>

* Update docs/guide/basics/sizing.md

Co-authored-by: Jakob Guddas <github@jguddas.de>

* Update docs/guide/basics/sizing.md

Co-authored-by: Jakob Guddas <github@jguddas.de>

* Update docs/guide/basics/sizing.md

Co-authored-by: Jakob Guddas <github@jguddas.de>

* Update docs/guide/basics/sizing.md

Co-authored-by: Jakob Guddas <github@jguddas.de>

* Update docs/guide/basics/sizing.md

Co-authored-by: Jakob Guddas <github@jguddas.de>

* Update docs/guide/basics/stroke-width.md

Co-authored-by: Jakob Guddas <github@jguddas.de>

* Process feedback

* Add editor width percentage

* process feedback

---------

Co-authored-by: Jakob Guddas <github@jguddas.de>
2023-10-03 08:21:01 +02:00
Cd16d
614ef1a1d5 Lock icons (#1346)
* new lock/unlock icons

* Update icons/lock-2.svg

Co-authored-by: Jakob Guddas <github@jguddas.de>

* Update icons/unlock-2.svg

Co-authored-by: Jakob Guddas <github@jguddas.de>

* Update lock-2.svg

* Update unlock-2.svg

* Update unlock-2.svg

* Rename lock-2.json to lock-dot.json

* Rename lock-2.svg to lock-dot.svg

* Rename unlock-2.json to unlock-dot.json

* Rename unlock-2.svg to unlock-dot.svg

* Update icons/lock-dot.svg

Co-authored-by: Jakob Guddas <github@jguddas.de>

* Update icons/unlock-dot.svg

Co-authored-by: Jakob Guddas <github@jguddas.de>

* Update and rename lock-dot.json to lock-keyhole.json

* Rename lock-dot.svg to lock-keyhole.svg

* Update and rename unlock-dot.json to unlock-keyhole.json

* Rename unlock-dot.svg to unlock-keyhole.svg

---------

Co-authored-by: Jakob Guddas <github@jguddas.de>
Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2023-10-02 20:25:05 +02:00
Jakob Guddas
1a441812ac feat: changed mouse-pointer-click (#1563)
* feat: changed `mouse-pointer-click`

* Update mouse-pointer-click.json
2023-10-02 19:40:22 +02:00
Daniel Bayley
4a33e90c65 Add geometry icons (#1142)
* Add `radius` icon

* Add `tangent` icon

* Refine `radius` icon

* Add `circumference` icon

* Add `tangent` icon

* Fix: rename `circumference` to `diameter`

* Add `cylinder` icon

* Add `cylinder-volume` icon

* Add `area` icon

* Refine `layers` icon

* Add `drafting-compass` icon

* Update icons/drafting-compass.svg

Co-authored-by: Karsa <contact@karsa.org>

* Update icons/cylinder-volume.svg

Co-authored-by: Jakob Guddas <github@jguddas.de>

* Update icons/diameter.svg

Co-authored-by: Jakob Guddas <github@jguddas.de>

* Add `pyramid` icon

* Add `cone` icon

* Update icons/cone.svg

Co-authored-by: Karsa <contact@karsa.org>

* Refine `cone` icon

* Improve geometry icons metadata

* Refine `layers` icon

* Add `layers` alternate icon

* Add `pentagon` icon

* Improve `layers` alternate icon metadata

* Add `torus` icon

* Refine `area` icon

* Improve metadata

* Add `layers-3` variant

* Add `plot` icon

* Refine `plot` icon

* Rename `plot` to `land-plot`

* Add `cuboid` (brick) icon

* Add `weight` icon

* Optimise `triangle` icon

* Update icons/weight.svg

Co-authored-by: Karsa <contact@karsa.org>

* Update icons/weight.json

Co-authored-by: Karsa <contact@karsa.org>

* Refine `pyramid` icon

* Optimise `tangent` icon

* Refine `cone` icon

* Refine `pyramid` icon

* Update icons/cone.svg

Co-authored-by: Karsa <contact@karsa.org>

* Update icons/cuboid.svg

Co-authored-by: Karsa <contact@karsa.org>

* Update icons/cylinder-volume.svg

Co-authored-by: Karsa <contact@karsa.org>

* Update icons/land-plot.svg

Co-authored-by: Karsa <contact@karsa.org>

* Update icons/diameter.svg

Co-authored-by: Karsa <contact@karsa.org>

* Update icons/layers-2.svg

Co-authored-by: Karsa <contact@karsa.org>

* Update icons/layers.svg

Co-authored-by: Karsa <contact@karsa.org>

* Update icons/pyramid.svg

Co-authored-by: Karsa <contact@karsa.org>

* Update icons/radius.svg

Co-authored-by: Karsa <contact@karsa.org>

* Update icons/tangent.svg

Co-authored-by: Karsa <contact@karsa.org>

* Update icons/triangle.svg

Co-authored-by: Karsa <contact@karsa.org>

* Update icons/layers-3.svg

Co-authored-by: Karsa <contact@karsa.org>

* Delete icons/area.json

* Delete icons/area.svg

* Delete icons/cylinder-volume.json

* Delete icons/cylinder-volume.svg

* Add comma database.json

---------

Co-authored-by: Karsa <contact@karsa.org>
Co-authored-by: Jakob Guddas <github@jguddas.de>
Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2023-10-02 19:29:54 +02:00
Jakob Guddas
062a64a078 feat: optimized uncategorized icons (#1573) 2023-09-25 20:16:25 +02:00
Eric Fennis
95a1ea7255 Merge branch 'main' of https://github.com/lucide-icons/lucide 2023-09-24 21:54:03 +02:00
Eric Fennis
a0a5bc8fc2 update digital ocean link website 2023-09-24 21:53:56 +02:00
Jakob Guddas
698eded89b Update gift.svg (#1571)
* Update gift.svg

* Update gift.json
2023-09-21 21:52:19 +02:00
Binyamin Aron Green
a70b713572 Fix solid package.json (#1558) (#1569)
- allow access to types file in "exports" field

Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2023-09-20 15:24:23 +02:00
Jakob Guddas
34530ad805 feat: more tags for graduation-cap (#1562) 2023-09-19 16:34:24 +02:00
Jakob Guddas
f73aed151a chore: added "dropdown" to tags (#1565)
* Update chevron-down.json

* Update chevron-up.json
2023-09-19 16:33:13 +02:00
Maxim Coppieters
2bd7748562 Add theater/drama icons (#1474)
* Add theater/drama icons

Related to #1399

Co-Authored-By: Daniel Bayley <daniel.bayley@me.com>

* Remove alternate drama icon

* Improve tags

---------

Co-authored-by: Daniel Bayley <daniel.bayley@me.com>
2023-09-16 13:04:13 +02:00
Daniel Bayley
da8a6c5a1b Add missing bookmark-* icons (#1259)
* Add `bookmark-x` icon

* Add `bookmark-off` icon

* Remove `bookmark-off` icon

* Add `bookmark-slash` icon

* Swap `bookmark-slash` with `bookmark-check`
2023-09-16 12:57:53 +02:00
Eric Fennis
5736028dfa Update sponsor logos 2023-09-14 11:11:18 +02:00
Eric Fennis
45d2063340 Add digital ocean logo in readme 2023-09-14 10:42:02 +02:00
Erwann Lagouche
f71d3ffd1d Add speech icon (#1337)
* add speech icon

* center icon and apply global attributes

* fix: make paddings wider

* fix: smoothe angle on base of neck

* fix: add jguddas to contributors

* Update speech.svg

* Update speech.json

---------

Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2023-09-13 21:05:54 +02:00
Oliver Schmidt
b8c3a5fa0b Changed font creation process (#1413)
* Changed font creation process

* Class name prefix

Class name prefix added for backward compatibility.

* Container option in workflow removed

Removed the container option in github workflow lucide-font because it is not needed anymore, workflow was changed to nodejs only

* Fixed whitespaces in package.json

* Use releaseInformation instead of info.json

* Added workflow step

* Moved unicode numbers to convert function

* Added locale argument to sort function

* Delete pnpm-lock

* Updated versions, recreated pnpm-lock

* Updated dependencies

---------

Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2023-09-13 21:05:22 +02:00
Eric Fennis
a4076db69b fix: Allow slash icon with double release 2023-09-11 09:07:14 +02:00
Eric Fennis
55cb681461 Remove conflicting alias (#1555) 2023-09-09 08:29:41 +02:00
Eric Fennis
09d9bb747d Add bot-2 icon (#1544)
* Add bot-2 icon

* replace existing bot icon
2023-09-08 09:46:47 +02:00
Javi Aguilar
42f9cdceca Replace sun-moon icon (#1545)
* Add sun-moon-2 icon

* Update icons/sun-moon-2.svg

Co-authored-by: Jakob Guddas <github@jguddas.de>

* CR remarks

* Update sun-moon.json

---------

Co-authored-by: Jakob Guddas <github@jguddas.de>
2023-09-06 10:21:01 +02:00
Eric Fennis
c652723b32 Generated aliases for Weird NextJS Case transformations (#1549)
* add script

* Create script to generate the aliases Nextjs

* Apply aliases to the icon meta files

* Make sure duplicated imports are not added

* add command to lint-staged
2023-09-06 09:26:02 +02:00
Jan
a44328d8be Adjust name from "data-lucide-name" to "data-lucide" in documentation & vitepress config adjusted (#1551)
* adjusted name

* adjusted vitepress config and README file

* use glob pattern

---------

Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2023-09-04 16:02:34 +02:00
Eric Fennis
376568239f adjust export order (#1548) 2023-09-02 21:49:11 +02:00
Jackson
92d05b5fca Improve clarity and readability of packages guides in docs (#1547) 2023-09-02 21:48:45 +02:00
Daniel Bayley
27b5b7eaad Add slash icon/improve [*-]slash metadata (#1241)
* Add `slash` icon

* Improve `slash` icons metadata
2023-09-02 15:46:42 +02:00
Daniel Bayley
4de1355e54 Refine film/clapperboard icons (#1506)
* Refine `film` icon

* Refine `clapperboard` icon

* Improve metadata
2023-09-02 15:45:06 +02:00
Daniel Bayley
c8d94bf3e1 Add percent-* (discount price tag) icons/improve metadata (#1326)
* Add `percent-circle` icon

* Improve metadata

* Add `percent-square` icon

* Add `percent-diamond` icon
2023-08-31 13:59:53 +02:00
Daniel Bayley
a128d1c3c1 Optimise/add shield-* icons/improve metadata (#1349)
* Optimise `shield` icons

* Rename `shield-close` to `shield-x`

* Improve `shield` icons metadata

* Add `shield-half` variant

* Add `shield-ban` icon

* Add `shield-plus` icon

* Add `shield-minus` icon

* Add `shield-slash` icon

* Add `shield-more` icon

* Add `shield-cross` icon

* Add `shield-cross-diagonal` icon

* Add `shield-cross-big` icon

* Add `shield-stripe-diagonal` icon

* Add `shield-stripe-vertical` icon

* Add `shield-stripe-horizontal` icon

* Add `shield-stripes-horizontal` icon

* Add `shield-crucifix` icon

* Revert "Add `shield-cross-big` icon"

This reverts commit 6484b6ea45.

* Revert "Add `shield-cross-diagonal` icon"

This reverts commit ed474bdc1f.

* Revert "Add `shield-cross` icon"

This reverts commit 2ebc66e301.

* Revert "Add `shield-crucifix` icon"

This reverts commit 4fa201658a.

* Revert "Add `shield-stripes-horizontal` icon"

This reverts commit b884028623.

* Revert "Add `shield-stripe-horizontal` icon"

This reverts commit 40d7096dbf.

* Revert "Add `shield-stripe-vertical` icon"

This reverts commit 8839e095e3.

* Revert "Add `shield-stripe-diagonal` icon"

This reverts commit a5326ce108.

* Revert "Add `shield-slash` icon"

This reverts commit 7bab9fb256.

* Rename `shield-more` to `shield-ellipsis`
2023-08-31 13:43:30 +02:00
Daniel Bayley
e145cb05e2 Improve [send/bring]-to-[front/back] metadata (#1444)
* Refine `send-to-back` icon

* Improve metadata

* Revert "Refine `send-to-back` icon"

This reverts commit 4f59705fd4.
2023-08-31 13:41:43 +02:00
Daniel Bayley
759ff562fd Add missing badge-* currency (discount) icons (#1406)
* Add `badge-cent` (discount) icon

* Improve `badge-dollar-sign` metadata

* Add `badge-pound-sterling` (discount) icon

* Add `badge-euro` (discount) icon

* Add `badge-swiss-franc` (discount) icon

* Add `badge-japanese-yen` (discount) icon

* Add `badge-indian-rupee` (discount) icon

* Add `badge-russian-ruble` (discount) icon

* Refine `badge-indian-rupee` icon

* Refine `badge-russian-ruble` icon
2023-08-30 13:18:55 +02:00
Karsa
ae2899a09e Optimize russian-ruble.svg (#1541) 2023-08-29 15:17:22 +02:00
Daniel Bayley
8b7ea73aa3 Improve bug icons (#988)
* Refine `bug` icon

* Add `bug-off` icon

* Add `bug-play` (debug) icon

* Add `bug-x` icon

* Add `bug-x` variant

* Delete bug-x.json

* Delete bug-x.svg

* Delete bug-x-2.json

* Delete bug-x-2.svg

---------

Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2023-08-28 20:08:41 +02:00
Eric Fennis
1bdeae5364 Add conditional exports property Lucide Svelte package.json (#1499)
* add exports property

* adjust wild card import

* Fix exports

* revert bundleSize plugin change

* Fix exports build warning
2023-08-28 19:41:24 +02:00
Jan
0e307087f6 replaced SvelteComponentTyped with SvelteComponent (#1517)
Co-authored-by: Jan Richter <j.richter@vanlanschotkempen>
2023-08-28 19:21:04 +02:00
Karsa
a46114b3e7 [github] Added issue template forms (#1535)
* [github] Added issue template forms

* [github] yaml => yml

* Syntax fixes

* Further syntax fixes

* Sort issue templates

* Update 02_bug_report.yml

---------

Co-authored-by: Karsa <karsa@karsa.org>
2023-08-28 19:20:30 +02:00
Karsa
fcafe0e7b7 [pull-request-template] Added some clarification to pull request requirements. (#1531) 2023-08-28 15:49:06 +02:00
Karsa
5312982b8f [docs] Fixes icon design guide heading levels + naming mix-up (#1533)
* Fixes icon design guide heading levels + naming mix-up

* Update icon-design-guide.md

---------

Co-authored-by: Karsa <karsa@karsa.org>
2023-08-28 09:05:26 +02:00
Daniel Bayley
3a13fab009 Add archive-x (junk) icon (#1203)
* Add `archive-x` (junk) icon

* Improve metadata

* Refine `archive` icon

* Refine `archive-restore` icon

* Refine `archive-*` icons

* Update icons/archive-restore.svg

Co-authored-by: Karsa <contact@karsa.org>

* Update icons/archive-x.svg

Co-authored-by: Karsa <contact@karsa.org>

* Update icons/archive.svg

Co-authored-by: Karsa <contact@karsa.org>

---------

Co-authored-by: Karsa <contact@karsa.org>
2023-08-25 14:44:53 +02:00
Karsa
30a69ee670 [lucide-angular] Added factory to LUCIDE_ICONS injection token so that standalone components will be able to import LucideAngularModule. (#1529) 2023-08-25 08:43:16 +02:00
Jakob Guddas
5f442122ab feat: added dpi preview (#1510)
* feat: added dpi preview

* fix: switched to resvg

* build: updated versions and nitro build config

* fix: switched to resvg-wasm

* fix: trying out fetch with import meta url

* fix: trying out copy wasm file manually

* fix: wrong file path

* fix: trying out esmImport

* fix: oups

* fix: giving up

* fix: await initialization

* fix: still nothing

* Revert "fix: still nothing"

This reverts commit dcb9fe3837a32ec4149f41c9b8925ae0e2fbdb79.

* fix: implement suggestions

Co-authored-by: Eric Fennis <eric.fennis@gmail.com>

* Update .github/workflows/pull-request.yml

* Update .github/workflows/pull-request.yml

* Update .github/workflows/pull-request.yml

* Update .github/workflows/pull-request.yml

* Update .github/workflows/pull-request.yml

* Update .github/workflows/pull-request.yml

* Update .github/workflows/pull-request.yml

* Update .github/workflows/pull-request.yml

* Update .github/workflows/pull-request.yml

---------

Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2023-08-24 11:37:07 +02:00
Jakob Guddas
e78d910a83 feat: defention of done (#1224)
* feat: defention of done

* Update new-icon.md

* Update new-icon.md

* move file pull_request_template.md

* updated the PR template

* update checklist items

* update heading

* Update .github/pull_request_template.md

Co-authored-by: Jakob Guddas <github@jguddas.de>

* Update .github/pull_request_template.md

Co-authored-by: Jakob Guddas <github@jguddas.de>

* Update .github/pull_request_template.md

Co-authored-by: Jakob Guddas <github@jguddas.de>

* Update .github/pull_request_template.md

Co-authored-by: Jakob Guddas <github@jguddas.de>

* Update .github/pull_request_template.md

Co-authored-by: Jakob Guddas <github@jguddas.de>

* Update .github/pull_request_template.md

Co-authored-by: Karsa <contact@karsa.org>

* Update .github/pull_request_template.md

Co-authored-by: Karsa <contact@karsa.org>

* Update .github/pull_request_template.md

Co-authored-by: Karsa <contact@karsa.org>

* Update .github/pull_request_template.md

Co-authored-by: Karsa <contact@karsa.org>

* Update .github/pull_request_template.md

Co-authored-by: Karsa <contact@karsa.org>

* Update .github/pull_request_template.md

Co-authored-by: Karsa <contact@karsa.org>

---------

Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
Co-authored-by: Karsa <contact@karsa.org>
2023-08-21 10:30:09 +02:00
Karsa
ccc8dc2b34 Updated icon design guide (#1518)
* Update icon design guide with new design guidelines, naming convention & code convention additions.

* Fix heading levels.

* Update docs/guide/design/icon-design-guide.md
2023-08-21 10:29:51 +02:00
Jakob Guddas
96bcca0e08 Added more tags to party-popper meta data (#1519) 2023-08-19 15:15:35 +02:00
Alwyn Tan
d95b14a70b Fix: Copy SVG properties into the child in react-native-svg (#1485) 2023-08-16 23:01:41 +02:00
Daniel Bayley
a852a43ef4 Optimise box/package icons (#1481)
* Optimise `box` icon

* Optimise `package` icons

* Update icons/package-check.svg

Co-authored-by: Karsa <contact@karsa.org>

* Update icons/package-minus.svg

Co-authored-by: Karsa <contact@karsa.org>

* Update icons/package-plus.svg

Co-authored-by: Karsa <contact@karsa.org>

* Update icons/package-search.svg

Co-authored-by: Karsa <contact@karsa.org>

* Update icons/package-x.svg

Co-authored-by: Karsa <contact@karsa.org>

* Update icons/package.svg

Co-authored-by: Karsa <contact@karsa.org>

---------

Co-authored-by: Karsa <contact@karsa.org>
2023-08-15 19:34:12 +02:00
Jakob Guddas
4953a95e36 feat: added fallback background for browsers without prefers-color-scheme support (#1493)
* feat: added fallback background to svg preview for browsers without prefers-color-scheme support

* feat: added fallback background to svg stroke-width preview for browsers without prefers-color-scheme support
2023-08-15 19:32:25 +02:00
Martin Adamko
cad1b95b69 fix(icons): Rename send-horizonal to send-horizontal (#1496)
* fix(icons): Rename `send-horizonal` to `send-horizontal`

* feat(icons): Add `"send-horizonal"` alias for backward compatibility.
2023-08-14 09:00:42 +02:00
Daniel Bayley
92f3fb0f90 Fix database-backup/improve metadata/add database-zap (cache) icon (#1400)
* Fix `database-backup` icon

* Improve `database` icons metadata

* Add `database-zap` icon

* Update icons/database-zap.svg

Co-authored-by: Karsa <contact@karsa.org>

* Update icons/database-backup.svg

Co-authored-by: Karsa <contact@karsa.org>

* Revert "Update icons/database-backup.svg"

This reverts commit ef1cfd2065.

* Update icons/database-backup.svg

Co-authored-by: Karsa <contact@karsa.org>

---------

Co-authored-by: Karsa <contact@karsa.org>
2023-08-13 22:09:30 +02:00
Jakob Guddas
6e8895d075 fix: generate alias files for nextjs import mapping (#1486)
* fix: generate alias files for nextjs import mapping

* Add entry files in rollup build

* improve build flow other packages

---------

Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2023-08-13 22:07:54 +02:00
Daniel Bayley
a1b2ce5b7b Add browser/dev tools icons (#1319)
* Add `mouse-pointer-square-dashed` (inspect variant) icon

* Rename `inspect` to `mouse-pointer-square`

* Add `crosshair-square` (inspector) variant

* Add `computer-chip` icon

* Add `applications` icon

* Add `tablet-smartphone` (devices/responsive design) icon

* Add `waypoints` icon

* Revert "Add `crosshair-square` (inspector) variant"

This reverts commit 1610b85f66.

* Revert "Add `applications` icon"

This reverts commit 06bc672f0f.

* Remove `computer-chip` icon

* Improve metadata

* Revert "Add `waypoints` icon"

This reverts commit acc47f0816.

---------

Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2023-08-13 12:55:48 +02:00
Jakob Guddas
4a54e87e84 fix: cogs (#1225)
* fix: cogs

* fix: cogs

* fix: added folder-cog-2 as alias for folder-cog

* chore: removed file-cog-2

* feat: rotated cogs

* feat: rotated user-cogs-2 cog
2023-08-13 11:59:48 +02:00
Daniel Bayley
d8bdbff9c6 Improve utility-pole metadata (#1157)
Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2023-08-13 11:49:25 +02:00
Zara
70cffa8dd2 Fix lucide-vue-next stroke-width must be number bug (#1492) 2023-08-11 15:29:23 +02:00
Eric Fennis
8cff59627b Update Site to Vitepress 1.0.0-rc.4 and fix gh-icon api (#1491)
* update site dependencies

* revert preact change

* update config
2023-08-09 17:09:21 +02:00
Eric Fennis
b684a0083b update snapshots 2023-08-07 22:20:14 +02:00
762 changed files with 20972 additions and 9889 deletions

View File

@@ -4,3 +4,7 @@ coverage
lib
tests
node_modules
.eslintrc.js
docs/images
docs/guide/basics/examples
packages/lucide-react/dynamicIconImports.js

View File

@@ -1,10 +1,13 @@
const DEFAULT_ATTRS = require('./scripts/render/default-attrs.json');
module.exports = {
root: true,
env: {
browser: true,
node: true,
},
extends: ['airbnb-base', 'prettier'],
plugins: ['import', 'prettier'],
plugins: ['import', 'prettier', '@html-eslint'],
rules: {
'no-console': 'off',
'no-param-reassign': 'off',
@@ -15,6 +18,7 @@ module.exports = {
{
singleQuote: true,
trailingComma: 'all',
printWidth: 100
},
],
'import/no-extraneous-dependencies': [
@@ -37,4 +41,39 @@ module.exports = {
ecmaVersion: 'latest',
sourceType: 'module',
},
overrides: [
{
files: ['./icons/*.svg'],
parser: '@html-eslint/parser',
rules: {
'prettier/prettier': 'off',
'@html-eslint/require-doctype': 'off',
'@html-eslint/no-duplicate-attrs': 'error',
'@html-eslint/no-inline-styles': 'error',
'@html-eslint/require-attrs': [
'error',
...Object.entries(DEFAULT_ATTRS)
.map(([attr, value]) => ({ tag: 'svg', attr, value: String(value) }))
],
'@html-eslint/indent': ['error', 2],
"@html-eslint/no-multiple-empty-lines": ["error", { "max": 0 }],
'@html-eslint/no-extra-spacing-attrs': [
'error',
{
enforceBeforeSelfClose: true,
},
],
'@html-eslint/require-closing-tags': [
'error',
{
selfClosing: 'always',
allowSelfClosingCustom: true,
},
],
'@html-eslint/element-newline': 'error',
'@html-eslint/no-trailing-spaces': 'error',
'@html-eslint/quotes': 'error',
}
},
],
};

View File

@@ -0,0 +1,49 @@
name: Icon request
description: Suggest a new icon for this project
labels: ['🙌 icon request']
body:
- type: markdown
attributes:
value: |
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.
- type: input
id: name
attributes:
label: Icon name
description: What should this icon depict? For multiple icons, provide a comma-separated list.
validations:
required: true
- type: textarea
id: use-cases
attributes:
label: Use cases
description: Why do you need this icon? Include at least two real-life use cases per requested icon, avoiding generic descriptions like "it's a car icon".
placeholder: e.g. I need a star icon to use in my rating system.
validations:
required: true
- type: textarea
id: design-ideas
attributes:
label: Design ideas
description: What should this icon look like? Provide simple, minimalistic icon examples from other sets or your own drafts to help us visualize your request.
validations:
required: true
- type: checkboxes
id: checklist
attributes:
label: Checklist
description: Please review the following checklist before submitting your request.
options:
- label: I have searched if someone has submitted a similar issue before and there weren't any. (Please make sure to also search closed issues, as this issue might already have been resolved.)
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.
required: true
- label: I am not requesting an icon that includes religious, political imagery or hate symbols.
required: true
- label: I have provided appropriate use cases for the icon(s) requested.
required: true

View File

@@ -0,0 +1,90 @@
name: Bug report
description: Create a report to help us improve
labels: ['🐛 bug']
body:
- type: markdown
attributes:
value: |
Before reporting an issue, please search to see if someone has filed a similar issue before. If there is already an open issue, please add a 👍 and/or leave a comment with additional information.
- type: checkboxes
id: packages
attributes:
label: Package
description: Which Lucide packages are affected? You may select more than one.
options:
- label: lucide
- label: lucide-angular
- label: lucide-flutter
- label: lucide-preact
- label: lucide-react
- label: lucide-react-native
- label: lucide-solid
- label: lucide-svelte
- label: lucide-vue
- label: lucide-vue-next
- label: Figma plugin
- label: source/main
- label: other/not relevant
validations:
required: true
- type: input
id: version
attributes:
label: Version
description: What version of Lucide are you running?
placeholder: e.g. 0.289.1
validations:
required: true
- type: checkboxes
id: browsers
attributes:
label: Browser
description: In which browser(s) are you experiencing the issue? You may select more than one.
options:
- label: Chrome/Chromium
- label: Firefox
- label: Safari
- label: Edge
- label: iOS Safari
- label: Opera
- label: Other/not relevant
validations:
required: false
- type: checkboxes
id: operating-systems
attributes:
label: Operating system
description: In which operating systems a you experiencing the issue? You may select more than one.
options:
- label: Windows
- label: Linux
- label: macOS
- label: Other/not relevant
- type: textarea
id: description
attributes:
label: Description
description: Try to describe in detail the problem you're running into and provide additional context about your working environment if necessary.
placeholder: e.g. When I do X, Y happens instead of Z
validations:
required: true
- type: textarea
id: steps-to-reproduce
attributes:
label: Steps to reproduce
description: Please provide a detailed guide on how this issue can be reproduced or a live example with a working reproduction on Codesandbox, JSFiddle or similar.
placeholder: |
1. Import `check` icon
2. Add to a React component/view
3. Run the react app
4. Notice that the `check` isn't rendering correctly which seems a encoding problem
validations:
required: true
- type: checkboxes
id: checklist
attributes:
label: Checklist
description: Please review the following checklist before submitting your issue.
options:
- label: I have searched if someone has submitted a similar issue before and there weren't any. (Please make sure to also search closed issues, as this issue might already have been resolved.)
required: true

View File

@@ -0,0 +1,62 @@
name: lucide.dev bug report
description: Help us improve the Lucide site
labels: ['🐛 bug', '🌍 site']
body:
- type: markdown
attributes:
value: |
Before reporting an issue, please search to see if someone has filed a similar issue before. If there is already an open issue, please add a 👍 and/or leave a comment with additional information.
- type: checkboxes
id: browsers
attributes:
label: Browser
description: In which browser(s) are you experiencing the issue? You may select more than one.
options:
- label: Chrome/Chromium
- label: Firefox
- label: Safari
- label: Edge
- label: iOS Safari
- label: Opera
- label: Other/not relevant
validations:
required: false
- type: checkboxes
id: operating-systems
attributes:
label: Operating system
description: In which operating systems are you experiencing the issue? You may select more than one.
options:
- label: Windows
- label: Linux
- label: macOS
- label: Other/not relevant
- type: textarea
id: description
attributes:
label: Description
description: Try to describe in detail the problem you're running into and provide additional context about your working environment if necessary.
placeholder: e.g. When I do X, Y happens instead of Z
validations:
required: true
- type: textarea
id: stepsToReproduce
attributes:
label: Steps to reproduce
description: Please provide a detailed guide on how this issue can be reproduced.
placeholder: |
1. I click on an icon
2. I click on `Copy SVG` in the drawer
3. I paste from the clipboard
4. A base64 encoded data URI is inserted.
...
validations:
required: true
- type: checkboxes
id: checklist
attributes:
label: Checklist
description: Please review the following checklist before submitting your issue.
options:
- label: I have searched if someone has submitted a similar issue before and there weren't any. (Please make sure to also search closed issues, as this issue might already have been resolved.)
required: true

View File

@@ -0,0 +1,53 @@
name: Feature request
description: Share with us your ideas on how Lucide could be improved upon.
labels: ['💡 idea']
body:
- type: markdown
attributes:
value: |
Before submitting a new feature request, please search to see if someone has filed a similar request before. If there is already an open issue, please add a 👍 and/or leave a comment with additional information.
- type: checkboxes
id: packages
attributes:
label: Package
description: Which Lucide project do you wish this feature were added to? You may select more than one.
options:
- label: lucide
- label: lucide-angular
- label: lucide-flutter
- label: lucide-preact
- label: lucide-react
- label: lucide-react-native
- label: lucide-solid
- label: lucide-svelte
- label: lucide-vue
- label: lucide-vue-next
- label: Figma plugin
- label: all JS packages
- label: site
validations:
required: true
- type: textarea
id: description
attributes:
label: Description
description: Try to describe in detail the feature you wish existed.
placeholder: e.g. I want to be able to set extra CSS classes on icon components.
validations:
required: true
- type: textarea
id: use-cases
attributes:
label: Use cases
description: Why do you need this feature? Provide real-life use cases as to why this feature will be useful for others.
placeholder: e.g. I could use the extra classes to add animation or global custom styling to some icons.
validations:
required: true
- type: checkboxes
id: checklist
attributes:
label: Checklist
description: Please check the following items before submitting your issue.
options:
- label: I have searched the existing issues to make sure this bug has not already been reported.
required: true

View File

@@ -1,68 +0,0 @@
---
name: Bug report
about: Create a report to help us improve
labels: "🐛 bug"
---
<!--
Before reporting an issue, please search to see if someone has filed a similar issue before. If there is already an open issue, please add a 👍 and/or leave a comment with additional information.
-->
## Prerequisites
* Version:
* Are you running from source/main:
* Are you using a released build:
* Operating system:
* Bits:
## Step to reproduce
*(Type here)*
### Actual behavior
## Any message or error
*(Type here)*
## Resources
* Links
* Screenshots
Here is what a great bug report would look like:
```
## Prerequisites
Version: Release v3.1.0
Running from: Import using webpack
Operating system: Mac OSX
Bits: 64 bits
## Step to reproduce
- Import `check` icon
- Add to a React component/view
- Run the react app
- Notice that the `check` isn't rendering correctly which seems a encoding problem
### Actual behavior:
- Import `check` icon
- Add to a React component/view
- Run the react app
- Check is displayed with correct encoding (e.g UTF-8)
## Any message or error
No console output
...
## Resources
No resources
...
```

View File

@@ -1,18 +0,0 @@
---
name: Icon request
about: Suggest an new icon for this project
labels: "🙌 icon request"
---
<!--
Before creating an icon request, please search to see if someone has requested the icon already. If there is an open request, please add a 👍.
A note about brand logos and related material : We follow the decision from Feather Icons (https://github.com/feathericons/feather/issues/763) to deprecate icons relating to brands.
You will find some in the set, but we won't add any new ones. https://simpleicons.org has 24x24 SVG icons for this purpose.
-->
## Icon Request
* Icon name:
* Use case:
* _Screenshots_ of similar icons:

View File

@@ -1,15 +0,0 @@
---
name: New icon
about: Add a new icon to the library
labels: "🎨 <icon"
---
<!-- Thanks for submitting an icon! Please make sure you read the icon design guide
at https://github.com/lucide-icons/lucide/blob/main/docs/icon-design-guide.md beforehand,
and please fill everything below. -->
- **Name of the icon** : <!-- `icon` -->
- **Tags (alternative names for this icon)** (add them in as a separate json file using the same icon name) :
- **What is the purpose of this icon?** : <!-- Shows that one can click it to... / Is used to denote or label... -->
- **100% scale preview** : <!-- upload an image -->
- **Have you considered alternative possibilities** for its naming or design? :

55
.github/pull_request_template.md vendored Normal file
View File

@@ -0,0 +1,55 @@
<!-- Thank you for contributing! -->
<!-- Insert `closes #issueNumber` here if merging this PR will resolve an existing issue -->
## What is the purpose of this pull request?
<!-- Please choose one of the following, and put an "x" next to it. -->
- [ ] New Icon
- [ ] Bug fix
- [ ] New Feature
- [ ] Documentation update
- [ ] Other:
### Description
<!-- Please insert your description here and provide info about the "what" this PR is contribution -->
### Icon use case <!-- ONLY for new icons, remove this part if not icon PR -->
<!-- What is the purpose of this icon? For each icon added, please insert at least two real life use cases (the more the better). Text like "it's a car icon" is not accepted. -->
### Alternative icon designs <!-- ONLY for new icons, remove this part if not icon PR -->
<!-- If you have any alternative icon designs, please attach them here. -->
## Icon Design Checklist <!-- ONLY for new icons, remove this part if not icon PR -->
### Concept <!-- ONLY for new icons -->
<!-- All of these requirements must be fulfilled. -->
- [ ] I have provided valid use cases for each icon.
- [ ] I have not added any a brand or logo icon.
- [ ] I have not used any hate symbols.
- [ ] I have not included any religious or political imagery.
### Author, credits & license<!-- ONLY for new icons. -->
<!-- Please choose one of the following, and put an "x" next to it. -->
- [ ] The icons are solely my own creation.
- [ ] The icons were originally created in #<issueNumber> by @<githubUser>
- [ ] I've based them on the following Lucide icons: <!-- provide the list of icons -->
- [ ] I've based them on the following design: <!-- provide source URL and license permitting use -->
### Naming <!-- ONLY for new icons -->
<!-- All of these requirements must be fulfilled. -->
- [ ] I've read and followed the [naming conventions](https://lucide.dev/guide/design/icon-design-guide#naming-conventions)
- [ ] I've named icons by what they are rather than their use case.
- [ ] I've provided meta JSON files in `icons/[iconName].json`.
### Design <!-- ONLY for new icons -->
<!-- All of these requirements must be fulfilled. -->
- [ ] I've read and followed the [icon design guidelines](https://lucide.dev/guide/design/icon-design-guide)
- [ ] I've made sure that the icons look sharp on low DPI displays.
- [ ] I've made sure that the icons look consistent with the icon set in size, optical volume and density.
- [ ] I've made sure that the icons are visually centered.
- [ ] I've correctly optimized all icons to two points of precision.
## Before Submitting <!-- For every PR! -->
<!-- All of these requirements must be fulfilled. -->
- [ ] I've read the [Contribution Guidelines](https://github.com/lucide-icons/lucide/blob/main/CONTRIBUTING.md).
- [ ] I've checked if there was an existing PR that solves the same issue.

View File

@@ -16,32 +16,16 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: pnpm/action-setup@v2
with:
node-version: 16
- uses: pnpm/action-setup@v2.0.1
name: Install pnpm
id: pnpm-install
version: 8
- uses: actions/setup-node@v3.8.1
with:
version: 7
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
node-version: 18
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
run: pnpm install --frozen-lockfile
- name: Fetch tags
run: git fetch --all --tags
@@ -50,9 +34,6 @@ jobs:
id: latest-tag
run: echo "LATEST_TAG=$(git describe --tags `git rev-list --tags --max-count=1`)" >> $GITHUB_OUTPUT
- name: Install dependencies
run: pnpm install
- name: Check if we can patch
run: .github/workflows/version-up.sh --minor

25
.github/workflows/linting.yml vendored Normal file
View File

@@ -0,0 +1,25 @@
name: Linting
on:
pull_request:
paths:
- icons/**
jobs:
linting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v3.8.1
with:
node-version: 18
cache: 'pnpm'
- name: Install Dependencies
run: pnpm install --frozen-lockfile
- name: Run Linter
run: pnpm lint

View File

@@ -4,6 +4,7 @@ on:
pull_request:
paths:
- packages/lucide-angular/**
- tools/build-icons/**
- pnpm-lock.yaml
jobs:
@@ -11,32 +12,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: pnpm/action-setup@v2
with:
node-version: 16
- uses: pnpm/action-setup@v2.0.1
name: Install pnpm
id: pnpm-install
version: 8
- uses: actions/setup-node@v3.8.1
with:
version: 7
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
node-version: 18
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
run: pnpm install --frozen-lockfile
- name: Build
run: pnpm --filter lucide-angular build

View File

@@ -4,49 +4,30 @@ on:
pull_request:
paths:
- icons/**
- tools/build-font/**
- pnpm-lock.yaml
jobs:
lucide-font:
runs-on: ubuntu-latest
container: ericfennis/lucide-font:latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3.4.1
- uses: pnpm/action-setup@v2
with:
node-version: 16
- uses: pnpm/action-setup@v2.0.1
name: Install pnpm
id: pnpm-install
version: 8
- uses: actions/setup-node@v3.8.1
with:
version: 7
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
node-version: 18
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --filter outline-svg
run: pnpm install --frozen-lockfile
- name: Outline svg Icons
run: pnpm build:outline-icons
- name: Create directory
run: mkdir lucide-font
- name: Build font
run: fontcustom compile "./outlined" -h -n "lucide" -o ./lucide-font -F
- name: Create font in ./lucide-font
run: pnpm build:font
- name: "Upload to Artifacts"
uses: actions/upload-artifact@v1

View File

@@ -4,6 +4,8 @@ on:
pull_request:
paths:
- packages/lucide-preact/**
- tools/build-icons/**
- tools/rollup-plugins/**
- pnpm-lock.yaml
jobs:
@@ -11,32 +13,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: pnpm/action-setup@v2
with:
node-version: 16
- uses: pnpm/action-setup@v2.0.1
name: Install pnpm
id: pnpm-install
version: 8
- uses: actions/setup-node@v3.8.1
with:
version: 7
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
node-version: 18
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
run: pnpm install --frozen-lockfile
- name: Build
run: pnpm --filter lucide-preact build

View File

@@ -4,6 +4,8 @@ on:
pull_request:
paths:
- packages/lucide-react-native/**
- tools/build-icons/**
- tools/rollup-plugins/**
- pnpm-lock.yaml
jobs:
@@ -11,32 +13,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: pnpm/action-setup@v2
with:
node-version: 16
- uses: pnpm/action-setup@v2.0.1
name: Install pnpm
id: pnpm-install
version: 8
- uses: actions/setup-node@v3.8.1
with:
version: 7
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
node-version: 18
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
run: pnpm install --frozen-lockfile
- name: Build
run: pnpm --filter lucide-react-native build

View File

@@ -4,6 +4,9 @@ on:
pull_request:
paths:
- packages/lucide-react/**
- tools/build-icons/**
- tools/rollup-plugins/**
- scripts/generateNextJSAliases.mjs
- pnpm-lock.yaml
jobs:
@@ -11,32 +14,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: pnpm/action-setup@v2
with:
node-version: 16
- uses: pnpm/action-setup@v2.0.1
name: Install pnpm
id: pnpm-install
version: 8
- uses: actions/setup-node@v3.8.1
with:
version: 7
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
node-version: 18
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
run: pnpm install --frozen-lockfile
- name: Build
run: pnpm --filter lucide-react build

View File

@@ -4,6 +4,8 @@ on:
pull_request:
paths:
- packages/lucide-solid/**
- tools/build-icons/**
- tools/rollup-plugins/**
- pnpm-lock.yaml
jobs:
@@ -11,32 +13,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: pnpm/action-setup@v2
with:
node-version: 16
- uses: pnpm/action-setup@v2.0.1
name: Install pnpm
id: pnpm-install
version: 8
- uses: actions/setup-node@v3.8.1
with:
version: 7
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
node-version: 18
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
run: pnpm install --frozen-lockfile
- name: Build
run: pnpm --filter lucide-solid build

View File

@@ -4,6 +4,7 @@ on:
pull_request:
paths:
- packages/lucide-static/**
- tools/build-icons/**
- pnpm-lock.yaml
jobs:
@@ -11,32 +12,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: pnpm/action-setup@v2
with:
node-version: 16
- uses: pnpm/action-setup@v2.0.1
name: Install pnpm
id: pnpm-install
version: 8
- uses: actions/setup-node@v3.8.1
with:
version: 7
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
node-version: 18
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
run: pnpm install --frozen-lockfile
- name: Build
run: pnpm --filter lucide-static build

View File

@@ -4,6 +4,8 @@ on:
pull_request:
paths:
- packages/lucide-svelte/**
- tools/build-icons/**
- tools/rollup-plugins/**
- pnpm-lock.yaml
jobs:
@@ -11,32 +13,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: pnpm/action-setup@v2
with:
node-version: 16
- uses: pnpm/action-setup@v2.0.1
name: Install pnpm
id: pnpm-install
version: 8
- uses: actions/setup-node@v3.8.1
with:
version: 7
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
node-version: 18
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
run: pnpm install --frozen-lockfile
- name: Build
run: pnpm --filter lucide-svelte build

View File

@@ -4,6 +4,8 @@ on:
pull_request:
paths:
- packages/lucide-vue-next/**
- tools/build-icons/**
- tools/rollup-plugins/**
- pnpm-lock.yaml
jobs:
@@ -11,32 +13,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: pnpm/action-setup@v2
with:
node-version: 16
- uses: pnpm/action-setup@v2.0.1
name: Install pnpm
id: pnpm-install
version: 8
- uses: actions/setup-node@v3.8.1
with:
version: 7
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
node-version: 18
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
run: pnpm install --frozen-lockfile
- name: Build
run: pnpm --filter lucide-vue-next build

View File

@@ -4,6 +4,8 @@ on:
pull_request:
paths:
- packages/lucide-vue/**
- tools/build-icons/**
- tools/rollup-plugins/**
- pnpm-lock.yaml
jobs:
@@ -11,32 +13,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: pnpm/action-setup@v2
with:
node-version: 16
- uses: pnpm/action-setup@v2.0.1
name: Install pnpm
id: pnpm-install
version: 8
- uses: actions/setup-node@v3.8.1
with:
version: 7
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
node-version: 18
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
run: pnpm install --frozen-lockfile
- name: Build
run: pnpm --filter lucide-vue build

View File

@@ -4,6 +4,8 @@ on:
pull_request:
paths:
- packages/lucide/**
- tools/build-icons/**
- tools/rollup-plugins/**
- pnpm-lock.yaml
jobs:
@@ -11,32 +13,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: pnpm/action-setup@v2
with:
node-version: 16
- uses: pnpm/action-setup@v2.0.1
name: Install pnpm
id: pnpm-install
version: 8
- uses: actions/setup-node@v3.8.1
with:
version: 7
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
node-version: 18
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
run: pnpm install --frozen-lockfile
- name: Build
run: pnpm --filter lucide build

View File

@@ -4,14 +4,65 @@ on:
pull_request_target:
paths:
- 'icons/*.svg'
permissions:
pull-requests: write
contents: write
branches:
- main
jobs:
add-changed-icons-comment:
lint-contributors:
if: github.repository == 'lucide-icons/lucide'
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: refs/pull/${{ github.event.pull_request.number }}/merge
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v35
with:
files: icons/*
- uses: actions/setup-node@v3.8.1
- name: Install simple-git (safer and faster than installing all deps)
run: npm install simple-git
- name: Generate annotations
run: node ./scripts/updateContributors.mjs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
FETCH_DEPTH: ${{ github.event.pull_request.commits }}
CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
- name: Generate annotations
env:
ANNOTATION_SEVERITY: notice
ANNOTATION_TITLE: Contributors have changed!
ANNOTATION_DESCRIPTION: Don't add people who have only performed automatic optimizations.
run: |
git diff --unified=0 -- icons/*.json | # diff icon metadata (unified=0 gives the correct chunk line number)
perl -ne '/^(\+|- |@)/ && print' | # get chunks (lines that start with "+++", "@@", "+ ", "- ")
perl -pe 's/\n/%0A/' | # url encode line breaks (\n -> %0A)
perl -pe 's/%0A(\+\+\+ b\/)/\n\1/g' | # split chunks(one chunk per line)
perl -pe "s/\+\+\+ b\/([^@]*)%0A@@ -(\d+)[^\s]* \+(\d+)[^@]*@@(.*)/::$ANNOTATION_SEVERITY file=\1,line=\2,endLine=\3,title=$ANNOTATION_TITLE::$ANNOTATION_DESCRIPTION%0A\4/"
# Example for the previous substitution
# input: +++ b/icons/accessibility.json%0A@@ -2,0 +3 @@%0A+ "contributors": ["hi"],%0A@@ -13 +14 @@%0A+}%0A
# output: ::$ANNOTATION_SEVERITY file=icons/accessibility.json,line=2,endLine=3,title=$ANNOTATION_TITLE::$ANNOTATION_DESCRIPTION%0A%0A+ "contributors": ["hi"],%0A@@ -13 +14 @@%0A+}%0A
# - name: Fail if contributors have changed
# run: git diff --exit-code -- icons/*.json
generate-changed-icons-comment-data:
if: github.repository == 'lucide-icons/lucide'
runs-on: ubuntu-latest
permissions:
contents: read
outputs:
generate-1px-stroke-width: ${{ steps.generate-1px-stroke-width.outputs.body }}
generate-2px-stroke-width: ${{ steps.generate-2px-stroke-width.outputs.body }}
generate-3px-stroke-width: ${{ steps.generate-3px-stroke-width.outputs.body }}
generate-24px-dpi-preview: ${{ steps.generate-24px-dpi-preview.outputs.body }}
generate-cohesion-check-random: ${{ steps.generate-cohesion-check-random.outputs.body }}
generate-cohesion-check-squares: ${{ steps.generate-cohesion-check-squares.outputs.body }}
generate-x-rays: ${{ steps.generate-x-rays.outputs.body }}
steps:
- uses: actions/checkout@v2
with:
@@ -22,8 +73,26 @@ jobs:
uses: tj-actions/changed-files@v35
with:
files: icons/*.svg
- name: Generate 24px dpi preview
id: generate-24px-dpi-preview
env:
CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
delimiter="$(openssl rand -hex 8)"
echo "body<<$delimiter" >> $GITHUB_OUTPUT
while IFS= read -r file; do
cat "$file" | # get file content
tr '\n' ' ' | # remove line breaks
sed -e 's/<svg[^>]*>/<svg>/g' | # remove attributes from svg element
base64 -w 0 | # encode svg
sed "s|.*|<img title=\"$file\" alt=\"$file\" src=\"https://lucide.dev/api/gh-icon/dpi/24/&.svg\"/> |"
done <<< "$CHANGED_FILES" | tr '\n' ' ' >> $GITHUB_OUTPUT
echo >> $GITHUB_OUTPUT
echo "$delimiter" >> $GITHUB_OUTPUT
- name: Generate cohesion check random
id: generate-cohesion-check-random
env:
CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
delimiter="$(openssl rand -hex 8)"
echo "body<<$delimiter" >> $GITHUB_OUTPUT
@@ -33,11 +102,13 @@ jobs:
sed -e 's/<svg[^>]*>/<svg>/g' | # remove attributes from svg element
base64 -w 0 | # encode svg
sed "s|.*|<img title=\"$file\" alt=\"$file\" src=\"https://lucide.dev/api/gh-icon/stroke-width/2/&.svg\"/> |"
done | tr '\n' ' ' >> $GITHUB_OUTPUT
done <<< "$CHANGED_FILES" | tr '\n' ' ' >> $GITHUB_OUTPUT
echo >> $GITHUB_OUTPUT
echo "$delimiter" >> $GITHUB_OUTPUT
- name: Generate cohesion check squares
id: generate-cohesion-check-squares
env:
CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
delimiter="$(openssl rand -hex 8)"
echo "body<<$delimiter" >> $GITHUB_OUTPUT
@@ -47,35 +118,39 @@ jobs:
sed -e 's/<svg[^>]*>/<svg>/g' | # remove attributes from svg element
base64 -w 0 | # encode svg
sed "s|.*|<img title=\"$file\" alt=\"$file\" src=\"https://lucide.dev/api/gh-icon/stroke-width/2/&.svg\"/> |"
done | tr '\n' ' ' >> $GITHUB_OUTPUT
done <<< "$CHANGED_FILES" | tr '\n' ' ' >> $GITHUB_OUTPUT
echo >> $GITHUB_OUTPUT
echo "$delimiter" >> $GITHUB_OUTPUT
- name: Generate 1px stroke-width
id: generate-1px-stroke-width
env:
CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
delimiter="$(openssl rand -hex 8)"
echo "body<<$delimiter" >> $GITHUB_OUTPUT
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
while IFS= read -r file; do
cat "$file" | # get file content
tr '\n' ' ' | # remove line breaks
sed -e 's/<svg[^>]*>/<svg>/g' | # remove attributes from svg element
base64 -w 0 | # encode svg
sed "s|.*|<img title=\"$file\" alt=\"$file\" src=\"https://lucide.dev/api/gh-icon/stroke-width/1/&.svg\"/> |"
done | tr '\n' ' ' >> $GITHUB_OUTPUT
done <<< "$CHANGED_FILES" | tr '\n' ' ' >> $GITHUB_OUTPUT
echo >> $GITHUB_OUTPUT
echo "$delimiter" >> $GITHUB_OUTPUT
- name: Generate 2px stroke-width
id: generate-2px-stroke-width
env:
CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
delimiter="$(openssl rand -hex 8)"
echo "body<<$delimiter" >> $GITHUB_OUTPUT
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
while IFS= read -r file; do
cat "$file" | # get file content
tr '\n' ' ' | # remove line breaks
sed -e 's/<svg[^>]*>/<svg>/g' | # remove attributes from svg element
base64 -w 0 | # encode svg
sed "s|.*|<img title=\"$file\" alt=\"$file\" src=\"https://lucide.dev/api/gh-icon/stroke-width/2/&.svg\"/> |"
done | tr '\n' ' ' >> $GITHUB_OUTPUT
done <<< "$CHANGED_FILES" | tr '\n' ' ' >> $GITHUB_OUTPUT
echo >> $GITHUB_OUTPUT
echo "$delimiter" >> $GITHUB_OUTPUT
- name: Generate 3px stroke-width
@@ -83,29 +158,39 @@ jobs:
run: |
delimiter="$(openssl rand -hex 8)"
echo "body<<$delimiter" >> $GITHUB_OUTPUT
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
while IFS= read -r file; do
cat "$file" | # get file content
tr '\n' ' ' | # remove line breaks
sed -e 's/<svg[^>]*>/<svg>/g' | # remove attributes from svg element
base64 -w 0 | # encode svg
sed "s|.*|<img title=\"$file\" alt=\"$file\" src=\"https://lucide.dev/api/gh-icon/stroke-width/3/&.svg\"/> |"
done | tr '\n' ' ' >> $GITHUB_OUTPUT
done <<< "$CHANGED_FILES" | tr '\n' ' ' >> $GITHUB_OUTPUT
echo >> $GITHUB_OUTPUT
echo "$delimiter" >> $GITHUB_OUTPUT
- name: Generate X-rays
id: generate-x-rays
env:
CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
delimiter="$(openssl rand -hex 8)"
echo "body<<$delimiter" >> $GITHUB_OUTPUT
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
while IFS= read -r file; do
cat "$file" | # get file content
tr '\n' ' ' | # remove line breaks
sed -e 's/<svg[^>]*>/<svg>/g' | # remove attributes from svg element
base64 -w 0 | # encode svg
sed "s|.*|<img width=\"400\" title=\"$file\" alt=\"$file\" src=\"https://lucide.dev/api/gh-icon/$(basename ${file//\.svg/})/&.svg\"/> |"
done | tr '\n' ' ' >> $GITHUB_OUTPUT
done <<< "$CHANGED_FILES" | tr '\n' ' ' >> $GITHUB_OUTPUT
echo >> $GITHUB_OUTPUT
echo "$delimiter" >> $GITHUB_OUTPUT
add-changed-icons-comment:
if: github.repository == 'lucide-icons/lucide'
runs-on: ubuntu-latest
permissions:
pull-requests: write
needs: [generate-changed-icons-comment-data]
steps:
- name: Find Comment
uses: peter-evans/find-comment@v2
id: fc
@@ -120,21 +205,25 @@ jobs:
issue-number: ${{ github.event.pull_request.number }}
body: |
### Added or changed icons
${{ steps.generate-2px-stroke-width.outputs.body }}<br/>
${{ needs.generate-changed-icons-comment-data.outputs.generate-2px-stroke-width }}<br/>
<details>
<summary>Preview cohesion</summary>
${{ steps.generate-cohesion-check-squares.outputs.body }}<br/>
${{ steps.generate-2px-stroke-width.outputs.body }}<br/>
${{ steps.generate-cohesion-check-random.outputs.body }}<br/>
${{ needs.generate-changed-icons-comment-data.outputs.generate-cohesion-check-squares }}<br/>
${{ needs.generate-changed-icons-comment-data.outputs.generate-2px-stroke-width }}<br/>
${{ needs.generate-changed-icons-comment-data.outputs.generate-cohesion-check-random }}<br/>
</details>
<details>
<summary>Preview stroke widths</summary>
${{ steps.generate-1px-stroke-width.outputs.body }}<br/>
${{ steps.generate-2px-stroke-width.outputs.body }}<br/>
${{ steps.generate-3px-stroke-width.outputs.body }}<br/>
${{ needs.generate-changed-icons-comment-data.outputs.generate-1px-stroke-width }}<br/>
${{ needs.generate-changed-icons-comment-data.outputs.generate-2px-stroke-width }}<br/>
${{ needs.generate-changed-icons-comment-data.outputs.generate-3px-stroke-width }}<br/>
</details>
<details>
<summary>DPI Preview (24px)</summary>
${{ needs.generate-changed-icons-comment-data.outputs.generate-24px-dpi-preview }}
</details>
<details>
<summary>Icon X-rays</summary>
${{ steps.generate-x-rays.outputs.body }}
${{ needs.generate-changed-icons-comment-data.outputs.generate-x-rays }}
</details>
edit-mode: replace

View File

@@ -39,6 +39,7 @@ jobs:
runs-on: ubuntu-latest
needs: pre-release
strategy:
fail-fast: false
matrix:
package: [
'lucide',
@@ -53,29 +54,13 @@ jobs:
]
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v3
with:
node-version: 18
- uses: pnpm/action-setup@v2.0.1
name: Install pnpm
id: pnpm-install
with:
version: 7
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
@@ -102,30 +87,13 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v2
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v3
with:
node-version: 16
- uses: pnpm/action-setup@v2.0.1
name: Install pnpm
id: pnpm-install
with:
version: 7
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
node-version: 18
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
@@ -149,44 +117,24 @@ jobs:
if: github.repository == 'lucide-icons/lucide'
runs-on: ubuntu-latest
needs: pre-release
container: ericfennis/lucide-font:latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3.4.1
- uses: pnpm/action-setup@v2
with:
node-version: 16
- uses: pnpm/action-setup@v2.0.1
name: Install pnpm
id: pnpm-install
version: 8
- uses: actions/setup-node@v3
with:
version: 7
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
node-version: 18
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --filter outline-svg
run: pnpm install --frozen-lockfile
- name: Outline svg Icons
run: pnpm build:outline-icons
- name: Create directory
run: mkdir lucide-font
- name: Build font
run: fontcustom compile "./outlined" -h -n "lucide" -o ./lucide-font -F
- name: Create font in ./lucide-font
run: pnpm build:font
- name: "Upload to Artifacts"
uses: actions/upload-artifact@v1

View File

@@ -3,5 +3,11 @@
"devs",
"preact",
"Preact"
]
],
"eslint.enable": true,
"eslint.validate": [
"javascript",
"svg"
],
"svg.preview.background": "transparent"
}

View File

@@ -33,7 +33,7 @@ Here you can find instructions on how to implement the guidelines with different
#### [Adobe Illustrator Guide](https://lucide.dev/docs/illustrator-guide)
You can also [download an Adobe Illustrator template](https://lucide.dev/templates/illustrator-template.ai).
You can also [download an Adobe Illustrator template](https://github.com/lucide-icons/lucide/blob/main/docs/public/templates/illustrator_template.ai).
#### [Inkscape Guide](https://lucide.dev/docs/inkscape-guide)

View File

@@ -11,14 +11,14 @@
Community-run fork of [Feather Icons](https://github.com/feathericons/feather), open for anyone to contribute icons.
It began after growing disaffection with the [Feather Icons](https://github.com/feathericons/feather) project moderation. With over 300+ open issues and over 100+ open PRs, the Feather Icons project has been abandoned. This unfortunately means that hundreds of developers and designers wasted their time contributing to Feather Icons with no chance of PRs being accepted.
It began after growing dissatisfaction with the [Feather Icons](https://github.com/feathericons/feather) project moderation. With over 300+ open issues and over 100+ open PRs, the Feather Icons project has been abandoned. This unfortunately means that hundreds of developers and designers wasted their time contributing to Feather Icons with no chance of PRs being accepted.
Lucide is trying to expand the icon set as much as possible while staying faithful to the original simplistic design language. We do this as a community of devs and designers and hope that you'll join us!
### Why choose Lucide over Feather Icons
- More icons to work with: Lucide already has hundreds of icons more than Feather does.
- Official librairies and integrations with popular frameworks and design tools.
- Official libraries and integrations with popular frameworks and design tools.
- Well maintained code base.
- Active community, regularly growing and improving the set.
@@ -35,7 +35,6 @@ Lucide is trying to expand the icon set as much as possible while staying faithf
- [Static (svg sprite, font, icons ..)](#static-svg-sprite-font-icons-)
- [Figma](#figma)
- [Laravel](#laravel)
- [Flutter](#flutter)
- [Svelte](#svelte)
- [Solid](#solid)
- [Hyva](#hyva)
@@ -200,16 +199,6 @@ composer require mallardduck/blade-lucide-icons
For more details, see the [documentation](https://github.com/mallardduck/blade-lucide-icons/blob/main/README.md).
### Flutter
Implementation of Lucide icon library for Flutter applications.
```sh
flutter pub add lucide_icons
```
For more details, see the [pub.dev](https://pub.dev/packages/lucide_icons).
### Svelte
Implementation of the lucide icon library for Svelte applications.
@@ -285,6 +274,9 @@ Thank you to all the people who contributed to Lucide!
## Sponsors
<a href="https://vercel.com?utm_source=lucide&utm_campaign=oss">
<img src="/docs/public/vercel.svg" alt="Powered by Vercel" width="200" />
<img src="docs/public/vercel.svg" alt="Powered by Vercel" width="200" />
</a>
<a href="https://www.digitalocean.com/?refcode=b0877a2caebd&utm_campaign=Referral_Invite&utm_medium=Referral_Program&utm_source=badge"><img src="docs/public/digitalocean.svg" width="200" alt="DigitalOcean Referral Badge" /></a>

View File

@@ -12,8 +12,10 @@
},
"title": "Lucide Icons category schema",
"type": "object",
"additionalProperties": false,
"required": ["$schema", "icon", "title"],
"properties": {
"title": {
"$schema": {
"type": "string"
},
"description": {
@@ -22,13 +24,12 @@
"icon": {
"type": "string"
},
"title": {
"type": "string"
},
"weight": {
"type": "integer"
}
},
"required": [
"title",
"icon"
],
"description": "A JSON Schema for categories defined by Lucide Icons."
}

View File

@@ -1,41 +1,53 @@
import { eventHandler, setResponseHeader, defaultContentType } from 'h3'
import { renderToString, renderToStaticMarkup } from 'react-dom/server'
import { createElement } from 'react'
import { eventHandler, setResponseHeader, defaultContentType } from 'h3';
import { renderToString, renderToStaticMarkup } from 'react-dom/server';
import { createElement } from 'react';
import SvgPreview from '../../lib/SvgPreview/index.tsx';
import iconNodes from '../../data/iconNodes'
import createLucideIcon from 'lucide-react/src/createLucideIcon'
import iconNodes from '../../data/iconNodes';
import createLucideIcon from 'lucide-react/src/createLucideIcon';
import Backdrop from '../../lib/SvgPreview/Backdrop.tsx';
export default eventHandler((event) => {
const { params } = event.context
const { params } = event.context;
const [name, svgData] = params.data.split('/');
const data = svgData.slice(0, -4);
const pathData = params.data.split('/');
const data = pathData.at(-1).slice(0, -4);
const [name] = pathData;
const src = Buffer.from(data, 'base64').toString('utf8');
const children = []
const children = [];
if (name in iconNodes) {
const iconNode = iconNodes[name]
// Finds the longest matching icon to be use as the backdrop.
// For `square-dashed-bottom-code` it suggests `square-dashed-bottom-code`.
// For `square-dashed-bottom-i-dont-exist` it suggests `square-dashed-bottom`.
const backdropName = name
.split('-')
.map((_, idx, arr) => arr.slice(0, idx + 1).join('-'))
.reverse()
.find((groupName) => groupName in iconNodes);
if (backdropName) {
const iconNode = iconNodes[backdropName];
const LucideIcon = createLucideIcon(name, iconNode)
const svg = renderToStaticMarkup(createElement(LucideIcon))
const LucideIcon = createLucideIcon(backdropName, iconNode);
const svg = renderToStaticMarkup(createElement(LucideIcon));
const backdropString = svg.replace(/<svg[^>]*>|<\/svg>/g, '');
children.push(createElement(Backdrop, { backdropString, src }))
children.push(
createElement(Backdrop, {
backdropString,
src,
color: name in iconNodes ? 'red' : '#777',
})
);
}
const svg = Buffer.from(
// We can't use jsx here, is not supported here by nitro.
renderToString(createElement(SvgPreview, {src, showGrid: true}, children)).replace(
/>/,
'><style>@media screen and (prefers-color-scheme: dark) { svg { stroke: #fff } }</style>'
)
renderToString(createElement(SvgPreview, { src, showGrid: true }, children))
).toString('utf8');
defaultContentType(event, 'image/svg+xml')
setResponseHeader(event, 'Cache-Control', 'public,max-age=31536000')
defaultContentType(event, 'image/svg+xml');
setResponseHeader(event, 'Cache-Control', 'public,max-age=31536000');
return svg
})
return svg;
});

View File

@@ -0,0 +1,73 @@
import { eventHandler, setResponseHeader, defaultContentType } from 'h3';
import { Resvg, initWasm } from '@resvg/resvg-wasm';
import wasm from './loadWasm';
var initializedResvg = initWasm(wasm);
export default eventHandler(async (event) => {
const { params = {} } = event.context;
await initializedResvg;
const imageSize = 96;
const [iconSizeString, svgData] = params.data.split('/');
const iconSize = parseInt(iconSizeString, 10);
const data = svgData.slice(0, -4);
const src = Buffer.from(data, 'base64').toString('utf8');
const svg = (src.includes('<svg') ? src : `<svg>${src}</svg>`)
.replace(/(\r\n|\n|\r)/gm, '')
.replace(
/<svg[^>]*/,
`<svg
xmlns="http://www.w3.org/2000/svg"
width="${iconSize}"
height="${iconSize}"
viewBox="0 0 24 24"
fill="none"
stroke="#fff"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
`
);
const resvg = new Resvg(svg, { background: '#000' });
const pngData = resvg.render();
const pngBuffer = Buffer.from(pngData.asPng());
defaultContentType(event, 'image/svg+xml');
setResponseHeader(event, 'Cache-Control', 'public,max-age=31536000');
return `
<svg xmlns="http://www.w3.org/2000/svg" width="${imageSize}" height="${imageSize}" viewBox="0 0 ${imageSize} ${imageSize}">
<style>
@media screen and (prefers-color-scheme: light) {
#fallback-background { fill: transparent; }
}
@media screen and (prefers-color-scheme: dark) {
#fallback-background { fill: transparent; }
rect { fill: #fff; }
}
</style>
<mask id="mask">
<image
width="${imageSize}"
height="${imageSize}"
href="data:image/png;base64,${pngBuffer.toString('base64')}"
image-rendering="pixelated"
/>
</mask>
<rect
id="fallback-background"
width="${imageSize}"
height="${imageSize}" ry="${imageSize / 24}"
fill="#fff"
/>
<rect
width="${imageSize}"
height="${imageSize}"
fill="#000"
mask="url(#mask)"
/>
</svg>`;
});

View File

@@ -0,0 +1,15 @@
import fs from 'fs';
import module from 'node:module';
/* WASM_IMPORT */
let wasm;
if (process.env.NODE_ENV === 'development') {
const require = module.createRequire(import.meta.url);
wasm = fs.readFileSync(require.resolve('@resvg/resvg-wasm/index_bg.wasm'));
} else {
wasm = resvg_wasm;
}
export default wasm;

View File

@@ -22,10 +22,19 @@ export default eventHandler((event) => {
const svg = Buffer.from(
// We can't use jsx here, is not supported here by nitro.
renderToString(createElement(Icon, { strokeWidth })).replace(
/>/,
'><style>@media screen and (prefers-color-scheme: dark) { svg { stroke: #fff } }</style>'
)
renderToString(createElement(Icon, { strokeWidth }))
.replace(/fill\="none"/, 'fill="#fff"')
.replace(
/>/,
`><style>
@media screen and (prefers-color-scheme: light) {
svg { fill: transparent !important; }
}
@media screen and (prefers-color-scheme: dark) {
svg { stroke: #fff; fill: transparent !important; }
}
</style>`
)
).toString('utf8');
defaultContentType(event, 'image/svg+xml')

View File

@@ -1,14 +1,6 @@
import { fileURLToPath, URL } from 'node:url'
import path from 'path';
import { defineConfig } from 'vitepress'
import { createWriteStream } from 'node:fs'
import { resolve } from 'node:path'
import { SitemapStream } from 'sitemap'
import sidebar from './sidebar';
import fs from 'fs';
const links = []
const title = "Lucide";
const socialTitle = "Lucide Icons";
@@ -20,6 +12,7 @@ export default defineConfig({
description,
cleanUrls: true,
outDir: '.vercel/output/static',
srcExclude: ['**/README.md'],
vite: {
resolve: {
alias: [
@@ -111,6 +104,7 @@ export default defineConfig({
{ text: 'Icons', link: '/icons/' },
{ text: 'Guide', link: '/guide/' },
{ text: 'Packages', link: '/packages' },
{ text: 'Showcase', link: '/showcase' },
{ text: 'License', link: '/license' },
],
sidebar,
@@ -125,33 +119,12 @@ export default defineConfig({
editLink: {
pattern: 'https://github.com/lucide-icons/lucide/edit/main/docs/:path'
},
},
transformHtml: (_, id, { pageData }) => {
if (/[\\/]404\.html$/.test(id)) {
return
carbonAds: {
code: 'CWYIC53U',
placement: 'lucidedev'
}
if (pageData.relativePath.startsWith('icons/')) {
links.push({
url: pageData.relativePath.replace(/((^|\/)index)?\.md$/, '$2'),
lastmod: pageData?.params?.changedRelease?.date
})
return
}
links.push({
url: pageData.relativePath.replace(/((^|\/)index)?\.md$/, '$2'),
lastmod: pageData.lastUpdated
})
},
buildEnd: async ({ outDir }) => {
const sitemap = new SitemapStream({
hostname: 'https://lucide.dev/'
})
const writeStream = createWriteStream(resolve(outDir, 'sitemap.xml'))
sitemap.pipe(writeStream)
links.forEach((link) => sitemap.write(link))
sitemap.end()
await new Promise((r) => writeStream.on('finish', r))
},
sitemap: {
hostname: 'https://lucide.dev/'
}
})

View File

@@ -0,0 +1,50 @@
[
{
"name": "Vercel",
"url": "https://vercel.com",
"image": {
"light": "/company-logos/vercel-light.svg",
"dark": "/company-logos/vercel-dark.svg"
}
},
{
"name": "Supabase",
"url": "https://supabase.com",
"image": {
"light": "/company-logos/supabase-light.svg",
"dark": "/company-logos/supabase-dark.svg"
}
},
{
"name": "Obsidian",
"url": "https://obsidian.md",
"image": {
"light": "/company-logos/obsidian-light.svg",
"dark": "/company-logos/obsidian-dark.svg"
}
},
{
"name": "Open Collective",
"url": "https://opencollective.com",
"image": {
"light": "/company-logos/open-collective-light.svg",
"dark": "/company-logos/open-collective-dark.svg"
}
},
{
"name": "Super",
"url": "https://super.so",
"image": {
"light": "/company-logos/super-light.svg",
"dark": "/company-logos/super-dark.svg"
}
},
{
"name": "Noodle",
"url": "https://noodle.run/",
"image": {
"light": "/company-logos/noodle-light.svg",
"dark": "/company-logos/noodle-dark.svg"
}
}
]

View File

@@ -0,0 +1,18 @@
[
{
"name": "Shadcn/ui",
"url": "https://ui.shadcn.com/",
"image": {
"light": "/library-logos/shadcn-ui-light.svg",
"dark": "/library-logos/shadcn-ui-dark.svg"
}
},
{
"name": "Tamagui",
"url": "https://tamagui.dev/",
"image": {
"light": "/library-logos/tamagui.svg",
"dark": "/library-logos/tamagui.svg"
}
}
]

View File

@@ -1,11 +1,12 @@
import React from 'react';
interface BackdropProps {
src: string
backdropString: string
src: string;
color?: string;
backdropString: string;
}
const Backdrop = ({ src, backdropString }: BackdropProps): JSX.Element => {
const Backdrop = ({ src, color = 'red', backdropString }: BackdropProps): JSX.Element => {
return (
<>
<defs xmlns="http://www.w3.org/2000/svg">
@@ -16,8 +17,8 @@ const Backdrop = ({ src, backdropString }: BackdropProps): JSX.Element => {
patternUnits="userSpaceOnUse"
patternTransform="rotate(45 50 50)"
>
<line stroke="red" strokeWidth={0.1} y2={1} />
<line stroke="red" strokeWidth={0.1} y2={1} />
<line stroke={color} strokeWidth={0.1} y2={1} />
<line stroke={color} strokeWidth={0.1} y2={1} />
</pattern>
</defs>
<mask id="svg-preview-backdrop-mask-outline" maskUnits="userSpaceOnUse">
@@ -29,20 +30,8 @@ const Backdrop = ({ src, backdropString }: BackdropProps): JSX.Element => {
<g dangerouslySetInnerHTML={{ __html: src }} strokeWidth={2.05} />
<g strokeWidth={1.75} dangerouslySetInnerHTML={{ __html: backdropString }} />
</mask>
<g
strokeWidth={2.25}
stroke="url(#pattern)"
mask={'url(#svg-preview-backdrop-mask-outline)'}
>
<rect
x="0"
y="0"
width="24"
height="24"
fill="url(#pattern)"
opacity={0.5}
stroke="none"
/>
<g strokeWidth={2.25} stroke="url(#pattern)" mask={'url(#svg-preview-backdrop-mask-outline)'}>
<rect x="0" y="0" width="24" height="24" fill="url(#pattern)" opacity={0.5} stroke="none" />
</g>
<rect
x="0"
@@ -58,14 +47,13 @@ const Backdrop = ({ src, backdropString }: BackdropProps): JSX.Element => {
y="0"
width="24"
height="24"
fill="red"
fill={color}
opacity={0.5}
stroke="none"
mask={'url(#svg-preview-backdrop-mask-fill)'}
/>
</>
)
}
);
};
export default Backdrop;

View File

@@ -4,7 +4,7 @@ import { getPaths, assert } from './utils';
const Grid = ({
radius,
fill,
fill = '#fff',
...props
}: {
strokeWidth: number;
@@ -12,6 +12,7 @@ const Grid = ({
} & PathProps<'stroke', 'strokeWidth'>) => (
<g className="svg-preview-grid-group" strokeLinecap="butt" {...props}>
<rect
className="svg-preview-grid-rect"
width={24 - props.strokeWidth}
height={24 - props.strokeWidth}
x={props.strokeWidth / 2}
@@ -198,6 +199,28 @@ const Radii = ({
);
};
const Handles = ({
paths,
...props
}: { paths: Path[] } & PathProps<
'strokeWidth' | 'stroke' | 'strokeDasharray' | 'strokeOpacity',
any
>) => {
console.log(paths);
return (
<g className="svg-preview-handles-group" {...props}>
{paths.map(({ c, prev, next, cp1, cp2 }) => (
<>
{cp1 && <path d={`M${prev.x} ${prev.y} ${cp1.x} ${cp1.y}`} />}
{cp1 && <circle cy={cp1.y} cx={cp1.x} r={0.25} />}
{cp2 && <path d={`M${next.x} ${next.y} ${cp2.x} ${cp2.y}`} />}
{cp2 && <circle cy={cp2.y} cx={cp2.x} r={0.25} />}
</>
))}
</g>
);
};
const SvgPreview = React.forwardRef<
SVGSVGElement,
{
@@ -207,7 +230,12 @@ const SvgPreview = React.forwardRef<
>(({ src, children, showGrid = false, ...props }, ref) => {
const paths = typeof src === 'string' ? getPaths(src) : src;
const darkModeCss = `@media screen and (prefers-color-scheme: dark) {
const darkModeCss = `@media screen and (prefers-color-scheme: light) {
.svg-preview-grid-rect { fill: none }
}
@media screen and (prefers-color-scheme: dark) {
.svg-preview-grid-rect { fill: none }
.svg
.svg-preview-grid-group,
.svg-preview-radii-group,
.svg-preview-shadow-mask-group,
@@ -232,6 +260,7 @@ const SvgPreview = React.forwardRef<
<style>{darkModeCss}</style>
{showGrid && <Grid strokeWidth={0.1} stroke="#777" strokeOpacity={0.3} radius={1} />}
<Shadow paths={paths} strokeWidth={4} stroke="#777" radius={1} strokeOpacity={0.15} />
<Handles paths={paths} strokeWidth={0.12} stroke="#777" strokeOpacity={0.6} />
<ColoredPath
paths={paths}
colors={[
@@ -257,6 +286,7 @@ const SvgPreview = React.forwardRef<
strokeOpacity={0.3}
/>
<ControlPath radius={1} paths={paths} pointSize={1} stroke="#fff" strokeWidth={0.125} />
<Handles paths={paths} strokeWidth={0.12} stroke="#FFF" strokeOpacity={0.3} />
{children}
</svg>
);

View File

@@ -8,7 +8,9 @@ export type Path = {
prev: Point;
next: Point;
isStart: boolean;
circle: { x: number; y: number; r: number };
circle?: { x: number; y: number; r: number };
cp1?: Point;
cp2?: Point;
c: ReturnType<typeof getCommands>[number];
};

View File

@@ -63,7 +63,7 @@ export const getPaths = (src: string) => {
c: typeof commands[number],
next: Point,
d?: string,
circle?: Path['circle']
extras?: { circle?: Path['circle']; cp1?: Path['cp1']; cp2?: Path['cp2'] }
) => {
assert(prev);
paths.push({
@@ -71,7 +71,7 @@ export const getPaths = (src: string) => {
d: d || `M ${prev.x} ${prev.y} L ${next.x} ${next.y}`,
prev,
next,
circle,
...extras,
isStart: start === prev,
});
prev = next;
@@ -110,7 +110,10 @@ export const getPaths = (src: string) => {
}
case SVGPathData.CURVE_TO: {
assert(prev);
addPath(c, c, `M ${prev.x} ${prev.y} ${encodeSVGPath(c)}`);
addPath(c, c, `M ${prev.x} ${prev.y} ${encodeSVGPath(c)}`, {
cp1: { x: c.x1, y: c.y1 },
cp2: { x: c.x2, y: c.y2 },
});
break;
}
case SVGPathData.SMOOTH_CURVE_TO: {
@@ -146,13 +149,20 @@ export const getPaths = (src: string) => {
y1: prev.y - reflectedCp1.y,
x2: c.x2,
y2: c.y2,
})}`
})}`,
{
cp1: reflectedCp1,
cp2: { x: c.x2, y: c.y2 },
}
);
break;
}
case SVGPathData.QUAD_TO: {
assert(prev);
addPath(c, c, `M ${prev.x} ${prev.y} ${encodeSVGPath(c)}`);
addPath(c, c, `M ${prev.x} ${prev.y} ${encodeSVGPath(c)}`, {
cp1: { x: c.x1, y: c.y1 },
cp2: { x: c.x1, y: c.y1 },
});
break;
}
case SVGPathData.SMOOTH_QUAD_TO: {
@@ -197,7 +207,11 @@ export const getPaths = (src: string) => {
y: c.y,
x1: prevCP.x,
y1: prevCP.y,
})}`
})}`,
{
cp1: { x: prevCP.x, y: prevCP.y },
cp2: { x: prevCP.x, y: prevCP.y },
}
);
break;
}
@@ -218,7 +232,7 @@ export const getPaths = (src: string) => {
c,
c,
`M ${prev.x} ${prev.y} A${c.rX} ${c.rY} ${c.xRot} ${c.lArcFlag} ${c.sweepFlag} ${c.x} ${c.y}`,
c.rX === c.rY ? { ...center, r: c.rX } : undefined
{ circle: c.rX === c.rY ? { ...center, r: c.rX } : undefined }
);
break;
}

View File

@@ -1,41 +1,29 @@
import {
BUNDLED_LANGUAGES,
type IThemeRegistration
} from 'shiki'
bundledLanguages,
type ThemeRegistration
} from 'shikiji'
import {
getHighlighter,
} from 'shiki-processor'
} from 'shikiji'
type CodeExampleType = {
title: string,
lang: string,
codes: {
language?: string,
code: string,
metastring?: string,
}[],
language: string,
code: string,
}[]
const getIconCodes = (): CodeExampleType => {
return [
{
lang: 'html',
language: 'html',
title: 'HTML',
codes: [
{
language: 'html',
code: `<i data-lucide-name="Name"></i>
`,
},
],
code: `<i data-lucide="Name"></i>`
},
{
lang: 'tsx',
language: 'tsx',
title: 'React',
codes: [
{
language: 'tsx',
code: `import { PascalCase } from 'lucide-react';
code: `import { PascalCase } from 'lucide-react';
const App = () => {
return (
@@ -45,17 +33,11 @@ const App = () => {
export default App;
`,
},
],
},
{
lang: 'vue',
title: 'Vue 3',
codes: [
{
language: 'vue',
code: `<script setup>
language: 'vue',
title: 'Vue',
code: `<script setup>
import { PascalCase } from 'lucide-vue-next';
</script>
@@ -63,33 +45,21 @@ export default App;
<PascalCase />
</template>
`,
},
],
},
{
lang: 'svelte',
language: 'svelte',
title: 'Svelte',
codes: [
{
language: 'svelte',
code: `<script>
code: `<script>
import { PascalCase } from 'lucide-svelte';
</script>
<PascalCase />
`,
},
],
},
{
lang: 'preact',
language: 'tsx',
title: 'Preact',
codes: [
{
language: 'tsx',
code: `import { PascalCase } from 'lucide-preact';
code: `import { PascalCase } from 'lucide-preact';
const App = () => {
return (
@@ -99,17 +69,11 @@ const App = () => {
export default App;
`,
},
],
},
{
lang: 'solid',
language: 'tsx',
title: 'Solid',
codes: [
{
language: 'tsx',
code: `import { PascalCase } from 'lucide-solid';
code: `import { PascalCase } from 'lucide-solid';
const App = () => {
return (
@@ -119,17 +83,11 @@ const App = () => {
export default App;
`,
},
],
},
{
lang: 'angular',
language: 'tsx',
title: 'Angular',
codes: [
{
language: 'tsx',
code: `// app.module.ts
code: `// app.module.ts
import { LucideAngularModule, PascalCase } from 'lucide-angular';
@NgModule({
@@ -141,54 +99,38 @@ import { LucideAngularModule, PascalCase } from 'lucide-angular';
// app.component.html
<lucide-icon name="Name"></lucide-icon>
`,
},
],
},
{
lang: 'html',
language: 'html',
title: 'Icon Font',
codes: [
{
language: 'html',
code: `<style>
code: `<style>
@import ('~lucide-static/font/Lucide.css');
</style>
<div class="icon-Name"></div>
`,
},
],
},
{
lang: 'dart',
title: 'Flutter',
codes: [
{
language: 'dart',
code: `Icon(LucideIcons.Name);
`,
},
],
},
}
]
}
export type ThemeOptions =
| IThemeRegistration
| { light: IThemeRegistration; dark: IThemeRegistration }
| ThemeRegistration
| { light: ThemeRegistration; dark: ThemeRegistration }
const highLightCode = async (code: string, lang: string, active?: boolean) => {
const highlighter = await getHighlighter({
themes: ['material-theme-palenight'],
langs: [...BUNDLED_LANGUAGES],
processors: []
themes: ['github-light', 'github-dark'],
langs: Object.keys(bundledLanguages)
})
const highlightedCode = highlighter.codeToHtml(code, {
lang,
// lineOptions,
theme: 'material-theme-palenight'
}).replace('background-color: #292D3E', '')
themes: {
light: 'github-light',
dark: 'github-dark'
},
defaultColor: false
}).replace('shiki-themes', 'shiki-themes vp-code')
return `<div class="language-${lang} ${active ? 'active' : ''}">
<button title="Copy Code" class="copy"></button>
@@ -201,16 +143,15 @@ const highLightCode = async (code: string, lang: string, active?: boolean) => {
export default async function createCodeExamples() {
const codes = getIconCodes();
const codeExamplePromises = codes.map(async (codeTemplate, index) => {
const { title, lang, codes } = codeTemplate;
const codeExamplePromises = codes.map(async ({ title, language, code }, index) => {
const isFirst = index === 0;
const code = await highLightCode(codes[0].code, codes[0].language || lang, isFirst);
const codeString = await highLightCode(code, language, isFirst);
return {
title,
language: codes[0].language || lang,
code,
language: language,
code: codeString,
};
})

View File

@@ -10,26 +10,49 @@ const sidebar: UserConfig<DefaultTheme.Config>['themeConfig']['sidebar'] = {
{ text: 'Comparison', link: '/guide/comparison' }
]
},
{
text: 'Basics',
items: [
{
text: 'Color',
link: '/guide/basics/color'
},
{
text: 'Sizing',
link: '/guide/basics/sizing'
},
{
text: 'Stroke width',
link: '/guide/basics/stroke-width'
},
]
},
// TODO: Add this section
// {
// text: 'Using Icons',
// text: 'Advanced',
// items: [
// {
// text: 'How to use icons',
// link: 'how-to-use-icons'
// },
// {
// text: 'Styling icons',
// link: 'styling-icons'
// },
// {
// text: 'Accessibility',
// link: 'accessibility'
// link: '/guide/advanced/accessibility'
// },
// {
// text: 'What should I use',
// link: 'what-should-i-use'
// text: 'Global styling',
// },
// {
// text: 'Animations',
// },
// {
// text: 'Filled icons',
// },
// {
// text: 'Combining icons',
// },
// {
// text: 'Dynamic imports'
// },
// // {
// // text: 'Auto importing'
// // },
// ]
// },
{
@@ -103,15 +126,9 @@ const sidebar: UserConfig<DefaultTheme.Config>['themeConfig']['sidebar'] = {
]
},
],
// This should be here to keep the sidebar shown on the icons page
'icons': [
{ text: '', link: '/' },
// { text: 'Categorized', link: '/icons/categorized' },
// {
// text: 'Categories',
// items: [
// ...(getAllCategoryFiles().map((category) => ({ text: category, link: `/icons/category/${category}` })))
// ]
// }
],
}

View File

@@ -7,5 +7,6 @@
<style scoped>
.container {
padding: 32px;
padding-top: 33px;
}
</style>

View File

@@ -36,6 +36,7 @@ const component = computed(() => props.href ? 'a' : 'div')
border-radius: 6px;
background-color: var(--vp-c-bg-alt);
color: var(--vp-c-text-1);
text-decoration: none;
/* width: 56px;
height: 56px; */
font-size: 16px;

View File

@@ -0,0 +1,56 @@
<script setup lang="ts">
import { computed } from 'vue';
const props = defineProps<{
href?: string;
}>()
const isExternal = computed(() => {
return props.href?.startsWith('http') ?? false
})
const component = computed(() => {
return props.href ? 'a' : 'div'
})
const rel = computed(() => {
return isExternal.value ? 'noreferrer noopener' : undefined
})
</script>
<template>
<component
:is="component"
:href="href"
:rel="rel"
class="card"
>
<slot />
</component>
</template>
<style scoped>
.card {
border: 1px solid var(--vp-c-bg-soft);
border-radius: 12px;
background-color: var(--vp-c-bg-soft);
display: flex;
flex-direction: column;
padding: 24px;
text-decoration: none;
}
.card[href] {
display: block;
border: 1px solid var(--vp-c-bg-soft);
border-radius: 12px;
height: 100%;
background-color: var(--vp-c-bg-soft);
transition: border-color .25s,background-color .25s;
}
.card[href]:hover {
border-color: var(--vp-c-brand-1);
}
</style>

View File

@@ -0,0 +1,36 @@
<template>
<div class="grid">
<slot />
</div>
</template>
<style scoped>
.grid {
display: flex;
flex-wrap: wrap;
align-items: stretch;
justify-content: center;
align-content: space-evenly;
box-sizing: border-box;
margin: -8px;
}
.grid > * {
flex-basis: 100%;
box-sizing: border-box;
padding: 8px;
}
@media (min-width: 960px) {
.grid > * {
flex-basis: 50%;
}
}
@media (min-width: 1280px) {
.grid > * {
flex-basis: 33.33%;
}
}
</style>

View File

@@ -54,7 +54,7 @@ const value = computed({
flex-shrink: 0;
}
.color-picker {
background: var(--color-picker-bg, var(--vp-c-bg-soft));
background: var(--color-picker-bg, var(--vp-c-bg-alt));
border-radius: 8px;
color: var(--vp-c-text-2);
padding: 4px 8px;
@@ -71,10 +71,10 @@ const value = computed({
.color-input-text {
width: 100%;
height: 100%;
padding: 0 8px;
padding: 0 0 0 8px;
border: none;
background: transparent;
color: var(--vp-c-text-2);
color: var(--vp-c-text-1);
font-size: 14px;
text-align: left;
border-radius: 8px;

View File

@@ -0,0 +1,63 @@
<script setup lang="ts">
import { computed } from 'vue';
import CardGrid from './CardGrid.vue';
const props = defineProps<{
title: string,
headingLevel: 1 | 2 | 3 | 4 | 5 | 6,
}>()
const headingElement = computed(() => `h${props.headingLevel}`)
</script>
<template>
<section>
<component :is="headingElement" class="name">{{ title }}</component>
<CardGrid>
<slot />
</CardGrid>
</section>
</template>
<style scoped>
.name {
font-size: 32px;
font-weight: bold;
text-align: center;
margin-bottom: 32px;
}
section {
margin-bottom: 96px;
}
.grid {
display: flex;
flex-wrap: wrap;
align-items: stretch;
justify-content: center;
align-content: space-evenly;
box-sizing: border-box;
margin: -8px;
}
.grid > * {
flex-basis: 100%;
box-sizing: border-box;
padding: 8px;
}
@media (min-width: 960px) {
.grid > * {
flex-basis: 50%;
}
}
@media (min-width: 1280px) {
.grid > * {
flex-basis: 33.33%;
}
}
</style>

View File

@@ -49,7 +49,7 @@ const percentage = computed<string>(() => `${((Number(props.modelValue) - props.
width: 100%;
line-height: 10px;
height: 20px;
--bar-color: var(--slider-bar-color, var(--vp-c-bg-soft));
--bar-color: var(--slider-bar-color, var(--vp-input-switch-bg-color));
}
.slider:hover input{

View File

@@ -10,7 +10,7 @@ import { data } from './HomeHeroBefore.data'
:href="`https://github.com/lucide-icons/lucide/releases/tag/${data.version}`"
target="_blank"
rel="noreferrer noopener"
>{{ data.version }}</Badge>
>v{{ data.version }}</Badge>
</HomeContainer>
</template>

View File

@@ -67,7 +67,10 @@ watch(absoluteStrokeWidth, (enabled) => {
Lucide has a lot of customization options to match the icons with your UI.
</p>
<div class="customizer">
<div
class="customizer"
style="--color-picker-bg: var(--vp-input-switch-bg-color)"
>
<InputField
id="icon-color"
label="Color"

View File

@@ -1,48 +1,50 @@
<script setup lang="ts">
import { onMounted } from 'vue'
import { useCategoryView } from '../../composables/useCategoryView'
import { onMounted } from 'vue';
import { useCategoryView } from '../../composables/useCategoryView';
interface Header {
level: number
title: string
slug: string
iconCount: number
link: string
children: Header[]
level: number;
title: string;
slug: string;
iconCount: number;
link: string;
children: Header[];
}
type MenuItem = Omit<Header, 'slug' | 'children'> & {
children?: MenuItem[]
}
children?: MenuItem[];
};
const props = defineProps<{
headers: MenuItem[]
root?: boolean
}>()
headers: MenuItem[];
root?: boolean;
}>();
const { selectedCategory } = useCategoryView()
const { selectedCategory } = useCategoryView();
function onClick(event: Event) {
const target = (event.target as HTMLElement).nodeName === 'span' ? (event.target as HTMLElement).parentNode : event.target as HTMLElement
const id = '#' + (target as HTMLAnchorElement).href!.split('#')[1]
const decodedId = decodeURIComponent(id)
const target =
(event.target as HTMLElement).nodeName === 'span'
? (event.target as HTMLElement).parentNode
: (event.target as HTMLElement);
const href = (target as HTMLAnchorElement)?.href;
selectedCategory.value = decodedId.replace('#', '')
if (href) {
const id = '#' + href.split('#')[1];
const decodedId = decodeURIComponent(id);
const heading = document.querySelector<HTMLAnchorElement>(decodedId)
heading?.focus()
selectedCategory.value = decodedId.replace('#', '');
const heading = document.querySelector<HTMLAnchorElement>(decodedId);
heading?.focus();
}
}
</script>
<template>
<ul :class="root ? 'root' : 'nested'">
<li v-for="{ children, link, title, iconCount } in headers">
<a
class="outline-link"
:href="link"
@click="onClick"
:title="title"
>
<a class="outline-link" :href="link" @click="onClick" :title="title">
<span>
{{ title }}
</span>

View File

@@ -10,6 +10,7 @@ import { useRouter } from 'vitepress';
import IconInfo from './IconInfo.vue';
import Badge from '../base/Badge.vue';
import { computedAsync } from '@vueuse/core';
import { satisfies } from 'semver';
const props = defineProps<{
iconName: string
@@ -25,6 +26,12 @@ const icon = computedAsync<IconEntity | null>(async () => {
const emit = defineEmits(['close'])
const isOpen = computed(() => !!icon.value)
function releaseTagLink(version) {
const shouldAddV = satisfies(version, `<0.266.0`)
return `https://github.com/lucide-icons/lucide/releases/tag/${shouldAddV ? 'v' : ''}${version}`
}
function onClose() {
emit('close')
}
@@ -43,7 +50,7 @@ const Expand = createLucideIcon('Expand', expand)
<Badge
v-if="icon.createdRelease"
class="version"
:href="`https://github.com/lucide-icons/lucide/releases/tag/v${icon.createdRelease.version}`"
:href="releaseTagLink(icon.createdRelease.version)"
target="_blank"
rel="noreferrer noopener"
>v{{ icon.createdRelease.version }}</Badge>

View File

@@ -1,93 +1,92 @@
<script setup lang="ts">
import { ref, computed, defineAsyncComponent } from 'vue'
import type { IconEntity, Category } from '../../types'
import useSearch from '../../composables/useSearch'
import InputSearch from '../base/InputSearch.vue'
import useSearchInput from '../../composables/useSearchInput'
import StickyBar from './StickyBar.vue'
import IconsCategory from './IconsCategory.vue'
import { useFetch } from '@vueuse/core'
import useFetchTags from '../../composables/useFetchTags'
import useFetchCategories from '../../composables/useFetchCategories'
import { ref, computed, defineAsyncComponent } from 'vue';
import type { IconEntity, Category } from '../../types';
import useSearch from '../../composables/useSearch';
import InputSearch from '../base/InputSearch.vue';
import useSearchInput from '../../composables/useSearchInput';
import StickyBar from './StickyBar.vue';
import IconsCategory from './IconsCategory.vue';
import { useFetch } from '@vueuse/core';
import useFetchTags from '../../composables/useFetchTags';
import useFetchCategories from '../../composables/useFetchCategories';
const props = defineProps<{
icons: IconEntity[]
categories: Category[]
iconCategories: Record<string, string[]>
}>()
icons: IconEntity[];
categories: Category[];
iconCategories: Record<string, string[]>;
}>();
const activeIconName = ref(null)
const { searchInput, searchQuery, searchQueryThrottled } = useSearchInput()
const activeIconName = ref(null);
const { searchInput, searchQuery, searchQueryDebounced } = useSearchInput();
const isSearching = computed(() => !!searchQuery.value)
const isSearching = computed(() => !!searchQuery.value);
function setActiveIconName(name: string) {
activeIconName.value = name
activeIconName.value = name;
}
const { execute: fetchTags, data: tags } = useFetchTags()
const { execute: fetchCategories, data: categoriesMap } = useFetchCategories()
const { execute: fetchTags, data: tags } = useFetchTags();
const { execute: fetchCategories, data: categoriesMap } = useFetchCategories();
const mappedIcons = computed(() => {
if(tags.value == null) {
return props.icons
if (tags.value == null) {
return props.icons;
}
return props.icons.map((icon) => {
const iconTags = tags.value[icon.name]
const iconCategories = categoriesMap.value?.[icon.name] ?? []
const iconTags = tags.value[icon.name];
const iconCategories = categoriesMap.value?.[icon.name] ?? [];
return {
...icon,
tags: iconTags,
categories: iconCategories,
}
})
})
};
});
});
const searchResults = useSearch(searchQuery, mappedIcons, [
{ name: 'name', weight: 2 },
{ name: 'tags', weight: 1 },
])
]);
const categories = computed(() => {
if( !props.categories?.length || !props.icons?.length ) return []
if (!props.categories?.length || !props.icons?.length) return [];
return props.categories.map(({ name, title }) => {
const categoryIcons = props.icons.filter((icon) => {
const iconCategories = props.iconCategories[icon.name]
return props.categories
.map(({ name, title }) => {
const categoryIcons = props.icons.filter((icon) => {
const iconCategories = props.iconCategories[icon.name];
return iconCategories?.includes(name)
return iconCategories?.includes(name);
});
const searchedCategoryIcons = isSearching
? categoryIcons.filter((icon) =>
searchResults.value.some((item) => item?.name === icon?.name)
)
: categoryIcons;
return {
title,
name,
icons: searchedCategoryIcons,
};
})
const searchedCategoryIcons = isSearching
? categoryIcons.filter(icon => searchResults.value.some((item) => item?.name === icon?.name))
: categoryIcons;
return {
title,
name,
icons: searchedCategoryIcons,
};
})
.filter(({ icons }) => icons.length)
})
.filter(({ icons }) => icons.length);
});
function onFocusSearchInput() {
if (tags.value == null) {
fetchTags()
fetchTags();
}
if (categoriesMap.value == null) {
fetchCategories()
fetchCategories();
}
}
const NoResults = defineAsyncComponent(() =>
import('./NoResults.vue')
)
const NoResults = defineAsyncComponent(() => import('./NoResults.vue'));
const IconDetailOverlay = defineAsyncComponent(() =>
import('./IconDetailOverlay.vue')
)
const IconDetailOverlay = defineAsyncComponent(() => import('./IconDetailOverlay.vue'));
</script>
<template>
@@ -100,11 +99,7 @@ const IconDetailOverlay = defineAsyncComponent(() =>
@focus="onFocusSearchInput"
/>
</StickyBar>
<NoResults
v-if="categories.length === 0"
:searchQuery="searchQuery"
@clear="searchQuery = ''"
/>
<NoResults v-if="categories.length === 0" :searchQuery="searchQuery" @clear="searchQuery = ''" />
<IconsCategory
v-for="category in categories"
:key="category.name"

View File

@@ -1,21 +1,21 @@
<script setup lang="ts">
import { ref, computed, watch, defineAsyncComponent } from 'vue'
import type { IconEntity } from '../../types'
import { useMediaQuery, useOffsetPagination } from '@vueuse/core'
import IconGrid from './IconGrid.vue'
import InputSearch from '../base/InputSearch.vue'
import useSearch from '../../composables/useSearch'
import EndOfPage from '../base/EndOfPage.vue'
import useSearchInput from '../../composables/useSearchInput'
import StickyBar from './StickyBar.vue'
import useFetchTags from '../../composables/useFetchTags'
import useFetchCategories from '../../composables/useFetchCategories'
import { ref, computed, watch, defineAsyncComponent } from 'vue';
import type { IconEntity } from '../../types';
import { useMediaQuery, useOffsetPagination } from '@vueuse/core';
import IconGrid from './IconGrid.vue';
import InputSearch from '../base/InputSearch.vue';
import useSearch from '../../composables/useSearch';
import EndOfPage from '../base/EndOfPage.vue';
import useSearchInput from '../../composables/useSearchInput';
import StickyBar from './StickyBar.vue';
import useFetchTags from '../../composables/useFetchTags';
import useFetchCategories from '../../composables/useFetchCategories';
const props = defineProps<{
icons: IconEntity[]
}>()
icons: IconEntity[];
}>();
const activeIconName = ref(null)
const activeIconName = ref(null);
const isExtraLargeScreen = useMediaQuery('(min-width: 1440px)');
const isLargeScreen = useMediaQuery('(min-width: 1280px)');
@@ -23,84 +23,78 @@ const isMediumScreen = useMediaQuery('(min-width: 960px)');
const isSmallScreen = useMediaQuery('(min-width: 640px)');
const pageSize = computed(() => {
if(isExtraLargeScreen.value) {
if (isExtraLargeScreen.value) {
return 16 * 20;
}
if(isLargeScreen.value) {
if (isLargeScreen.value) {
return 16 * 12;
}
if(isMediumScreen.value) {
if (isMediumScreen.value) {
return 13 * 12;
}
if(isSmallScreen.value) {
if (isSmallScreen.value) {
return 10 * 10;
}
return 10 * 5;
})
});
const { execute: fetchTags, data: tags } = useFetchTags()
const { execute: fetchCategories, data: categories } = useFetchCategories()
const { execute: fetchTags, data: tags } = useFetchTags();
const { execute: fetchCategories, data: categories } = useFetchCategories();
const mappedIcons = computed(() => {
if(tags.value == null) {
return props.icons
if (tags.value == null) {
return props.icons;
}
return props.icons.map((icon) => {
const iconTags = tags.value[icon.name]
const iconCategories = categories.value?.[icon.name] ?? []
const iconTags = tags.value[icon.name];
const iconCategories = categories.value?.[icon.name] ?? [];
return {
...icon,
tags: iconTags,
categories: iconCategories,
}
})
})
};
});
});
const { searchInput, searchQuery, searchQueryThrottled } = useSearchInput()
const searchResults = useSearch(searchQueryThrottled, mappedIcons, [
const { searchInput, searchQuery, searchQueryDebounced } = useSearchInput();
const searchResults = useSearch(searchQueryDebounced, mappedIcons, [
{ name: 'name', weight: 3 },
{ name: 'tags', weight: 2 },
{ name: 'categories', weight: 1 },
])
const { next, currentPage } = useOffsetPagination( { pageSize })
]);
const { next, currentPage } = useOffsetPagination({ pageSize });
const paginatedIcons = computed(() => {
const end = pageSize.value * currentPage.value
const end = pageSize.value * currentPage.value;
return searchResults.value.slice(0, end)
})
return searchResults.value.slice(0, end);
});
function setActiveIconName(name: string) {
activeIconName.value = name
activeIconName.value = name;
}
watch(searchQueryThrottled, (searchString) => {
currentPage.value = 1
})
watch(searchQueryDebounced, (searchString) => {
currentPage.value = 1;
});
function onFocusSearchInput() {
if (tags.value == null) {
fetchTags()
fetchTags();
}
if (categories.value == null) {
fetchCategories()
fetchCategories();
}
}
const NoResults = defineAsyncComponent(() =>
import('./NoResults.vue')
)
const IconDetailOverlay = defineAsyncComponent(() =>
import('./IconDetailOverlay.vue')
)
const NoResults = defineAsyncComponent(() => import('./NoResults.vue'));
const IconDetailOverlay = defineAsyncComponent(() => import('./IconDetailOverlay.vue'));
</script>
<template>
@@ -124,7 +118,7 @@ const IconDetailOverlay = defineAsyncComponent(() =>
:icons="paginatedIcons"
@setActiveIcon="setActiveIconName"
/>
<EndOfPage @end-of-page="next" class="bottom-page"/>
<EndOfPage @end-of-page="next" class="bottom-page" />
<IconDetailOverlay
v-if="activeIconName != null"
:iconName="activeIconName"

View File

@@ -36,15 +36,22 @@ const links = computed(() => [
<template>
<footer v-if="theme.footer" class="VPFooter" :class="{ 'has-sidebar': hasSidebar }">
<div class="container">
<p v-if="theme.footer.message" class="message" v-html="theme.footer.message"></p>
<p v-if="theme.footer.copyright" class="copyright" v-html="theme.footer.copyright"></p>
<div class="sponsors">
<a href="https://vercel.com?utm_source=lucide&utm_campaign=oss" rel="noreferrer noopener">
<img src="/vercel.svg" alt="Powered by Vercel" width="200" />
</a>
<a href="https://www.digitalocean.com/?refcode=b0877a2caebd&utm_campaign=Referral_Invite&utm_medium=Referral_Program&utm_source=badge" rel="noreferrer noopener">
<img src="/digitalocean.svg" alt="Digital Ocean" width="200" />
</a>
</div>
<div class="links">
<VPLink v-for="link in links" :href="link.href" :key="link.text" :rel="link.href.startsWith('http') ? 'noreferrer noopener': undefined">
{{ link.text }}
</VPLink>
<a href="https://vercel.com?utm_source=lucide&utm_campaign=oss" rel="noreferrer noopener">
<img src="/vercel.svg" alt="Powered by Vercel" width="200" />
</a>
</div>
<div>
<p v-if="theme.footer.message" class="message" v-html="theme.footer.message"></p>
<p v-if="theme.footer.copyright" class="copyright" v-html="theme.footer.copyright"></p>
</div>
</div>
</footer>
@@ -67,7 +74,7 @@ const links = computed(() => [
.container {
margin: 0 auto;
max-width: var(--vp-layout-max-width);
max-width: calc(var(--vp-layout-max-width) - 64px);
display: flex;
flex-direction: column;
align-items: center;
@@ -85,7 +92,7 @@ const links = computed(() => [
.message { order: 2; }
.copyright { order: 1; }
.links {
.links, .sponsors {
display: flex;
gap: 32px;
align-items: center;
@@ -102,7 +109,7 @@ const links = computed(() => [
flex-direction: row-reverse;
}
.links {
margin-left: auto;
margin-right: auto;
}
}
</style>

View File

@@ -1,24 +1,30 @@
<script setup lang="ts">
import {data} from './PackageList.data'
import GridSection from '../base/GridSection.vue'
import PackageListItem from "./PackageListItem.vue";</script>
<template>
<section class="package-group">
<h1 class="name">Packages</h1>
<div class="grid package-list" ref="container">
<div v-for="packageData in data.packages" class="item">
<PackageListItem :packageData="packageData"/>
</div>
</div>
</section>
<section class="package-group">
<h2 class="name">Third-party packages</h2>
<div class="grid package-list" ref="container">
<div v-for="packageData in data.thirdPartyPackages" class="item">
<PackageListItem :packageData="packageData"/>
</div>
</div>
</section>
<GridSection
title="Packages"
:headingLevel="1"
class="package-group"
>
<PackageListItem
v-for="packageData in data.packages"
:packageData="packageData"
/>
</GridSection>
<GridSection
title="Third-party packages"
:headingLevel="2"
class="package-group"
>
<PackageListItem
v-for="packageData in data.thirdPartyPackages"
:packageData="packageData"
/>
</GridSection>
</template>
<style scoped>
@@ -26,7 +32,7 @@ import PackageListItem from "./PackageListItem.vue";</script>
font-size: 32px;
font-weight: bold;
text-align: center;
margin-bottom: 24px;
margin-bottom: 32px;
}
.package-group {

View File

@@ -2,6 +2,7 @@
import { useRouter } from 'vitepress';
import {PackageItem} from "../../types";
import VPButton from 'vitepress/dist/client/theme-default/components/VPButton.vue';
import Card from '../base/Card.vue'
const { go } = useRouter()
const props = defineProps<{
@@ -10,48 +11,42 @@ const props = defineProps<{
</script>
<template>
<article class="package">
<header class="package-header">
<div class="package-icon-well">
<img :src="packageData.icon" alt="" class="package-icon" :class="{[packageData.iconClass]: true, light: packageData.iconDark}" />
<img v-if="packageData.iconDark" :src="packageData.iconDark" alt="" class="package-icon dark" :class="packageData.iconClass" />
<div>
<Card class="package">
<header class="package-header">
<div class="package-icon-well">
<img :src="packageData.icon" alt="" class="package-icon" :class="{[packageData.iconClass]: true, light: packageData.iconDark}" />
<img v-if="packageData.iconDark" :src="packageData.iconDark" alt="" class="package-icon dark" :class="packageData.iconClass" />
</div>
<div class="package-title">
<h2 class="title">{{ props.packageData.name }}</h2>
<a v-for="shield in props.packageData.shields" :href="shield.href" class="package-shield" rel="noreferrer noopener">
<img :src="shield.src" :alt="shield.href" />
</a>
</div>
</header>
<div class="package-details">
{{ packageData.description }}
</div>
<div class="package-title">
<h2 class="title">{{ props.packageData.name }}</h2>
<a v-for="shield in props.packageData.shields" :href="shield.href" class="package-shield" rel="noreferrer noopener">
<img :src="shield.src" :alt="shield.href" />
</a>
</div>
</header>
<div class="package-details">
{{ packageData.description }}
</div>
<footer class="package-footer">
<VPButton
:href="packageData.documentation"
text="Guide"
theme="brand"
@click="go(packageData.documentation)"
/>
<VPButton
:href="packageData.source"
text="Source"
theme="alt"
@click="go(packageData.source)"
/>
</footer>
</article>
<footer class="package-footer">
<VPButton
:href="packageData.documentation"
text="Guide"
theme="brand"
@click="go(packageData.documentation)"
/>
<VPButton
:href="packageData.source"
text="Source"
theme="alt"
@click="go(packageData.source)"
/>
</footer>
</Card>
</div>
</template>
<style scoped>
.package {
border: 1px solid var(--vp-c-bg-soft);
border-radius: 12px;
background-color: var(--vp-c-bg-soft);
display: flex;
flex-direction: column;
padding: 24px;
}
.package {
display: flex;
flex-direction: column;

View File

@@ -0,0 +1,72 @@
<script setup lang="ts">
import companies from '../../../data/companiesData.json'
import componentLibraries from '../../../data/componentLibrariesData.json'
import GridSection from '../base/GridSection.vue'
import ShowcaseListItem from "./ShowcaseListItem.vue";
</script>
<template>
<GridSection
title="Used by"
:headingLevel="1"
class="package-group"
>
<ShowcaseListItem
v-for="company in companies"
:showcaseItem="company"
/>
</GridSection>
<GridSection
title="Used in"
:headingLevel="1"
class="package-group"
>
<ShowcaseListItem
v-for="componentLibrary in componentLibraries"
:showcaseItem="componentLibrary"
/>
</GridSection>
</template>
<style scoped>
.name {
font-size: 32px;
font-weight: bold;
text-align: center;
margin-bottom: 32px;
}
.package-group {
margin-bottom: 96px;
}
.grid {
display: flex;
flex-wrap: wrap;
align-items: stretch;
justify-content: center;
align-content: space-evenly;
box-sizing: border-box;
margin: -8px;
}
.grid > * {
flex-basis: 100%;
box-sizing: border-box;
padding: 8px;
}
@media (min-width: 960px) {
.grid > * {
flex-basis: 50%;
}
}
@media (min-width: 1280px) {
.grid > * {
flex-basis: 33.33%;
}
}
</style>

View File

@@ -0,0 +1,52 @@
<script setup lang="ts">
import { useRouter } from 'vitepress';
import { ShowcaseItem } from "../../types";
import Card from '../base/Card.vue'
const { go } = useRouter()
defineProps<{
showcaseItem: ShowcaseItem,
}>()
</script>
<template>
<div>
<Card
class="company"
:href="showcaseItem.url"
:aria-label="showcaseItem.name"
>
<img
:src="showcaseItem.image.light"
class="logo light"
:alt="`${showcaseItem.name} logo`"
/>
<img
:src="showcaseItem.image.dark"
class="logo dark"
:alt="`${showcaseItem.name} logo`"
/>
</Card>
</div>
</template>
<style scoped>
.company {
display: flex;
height: 100%;
padding: 48px 0;
}
.logo {
height:64px;
width: 240px;
margin: auto;
}
html.dark .logo.dark {
display: none;
}
html:not(.dark) .logo.light {
display: none;
}
</style>

View File

@@ -1,43 +1,40 @@
import { refThrottled } from '@vueuse/core';
import { useDebounce } from '@vueuse/core';
import { nextTick, onMounted, ref, watch } from 'vue';
const useSearchInput = () => {
const searchInput = ref()
const searchInput = ref();
const searchQuery = ref(
typeof window === 'undefined'
? ''
: (
new URLSearchParams(window.location.search).get('search')
|| ''
)
)
const searchQueryThrottled = refThrottled(searchQuery, 400)
? ''
: new URLSearchParams(window.location.search).get('search') || ''
);
const searchQueryDebounced = useDebounce(searchQuery, 250);
watch(searchQueryThrottled, (searchString) => {
watch(searchQueryDebounced, (searchString) => {
const newUrl = new URL(window.location.href);
if(searchString === '') {
if (searchString === '') {
newUrl.searchParams.delete('search');
} else {
newUrl.searchParams.set('search', searchString);
}
nextTick(() => {
window.history.replaceState({}, '', newUrl)
})
})
window.history.replaceState({}, '', newUrl);
});
});
onMounted(() => {
const searchParams = new URLSearchParams(window.location.search);
if(searchParams.has('focus')) {
searchInput.value.focus()
if (searchParams.has('focus')) {
searchInput.value.focus();
}
})
});
return {
searchInput,
searchQuery,
searchQueryThrottled
searchQueryDebounced,
};
};

View File

@@ -0,0 +1,34 @@
{
"colors": {
"surface1": "var(--vp-code-block-bg)",
"surface2": "var(--vp-code-block-bg)",
"surface3": "var(--vp-code-line-highlight-color)",
"clickable": "var(--vp-c-text-2)",
"base": "#323232",
"disabled": "#C5C5C5",
"hover": "var(--vp-c-brand)",
"accent": "var(--vp-c-brand)",
"error": "var(--vp-c-red)",
"errorSurface": "#ffeceb"
},
"syntax": {
"plain": "var(--vp-code-editor-plain)",
"comment": {
"color": "var(--vp-code-editor-comment)",
"fontStyle": "italic"
},
"keyword": "var(--vp-code-editor-keyword)",
"tag": "var(--vp-code-editor-tag)",
"punctuation": "var(--vp-code-editor-punctuation)",
"definition": "var(--vp-code-editor-definition)",
"property": "var(--vp-code-editor-property)",
"static": "var(--vp-code-editor-static)",
"string": "var(--vp-code-editor-string)"
},
"font": {
"body": "var(--vp-font-family-base)",
"mono": "var(--vp-font-family-mono)",
"size": "var(--vp-code-font-size)",
"lineHeight": "var(--vp-code-line-height)"
}
}

View File

@@ -5,13 +5,39 @@
--vp-c-brand-dark: #DC5A5A;
--vp-c-brand-darker: #C45050;
--vp-c-brand-1: #F67373;
--vp-c-brand-2: #FF7070;
--vp-c-brand-3: #F56565;
--vp-c-brand-4: #DC5A5A;
--vp-c-brand-5: #C45050;
--vp-c-bg-alt-up: #fff;
--vp-c-bg-alt-down: #fff;
--vp-code-editor-plain: #24292E;
--vp-code-editor-comment: #6A737D;
--vp-code-editor-keyword: #D73A49;
--vp-code-editor-tag: #22863A;
--vp-code-editor-punctuation: #24292E;
--vp-code-editor-definition: #6F42C1;
--vp-code-editor-property: #005CC5;
--vp-code-editor-static: #F78C6C;
--vp-code-editor-string: #032F62;
}
.dark {
--vp-c-bg-alt-up: #1B1B1D;
--vp-c-bg-alt-down: #0F0F10;
--vp-code-editor-plain: #E1E4E8;
--vp-code-editor-comment: #6A737D;
--vp-code-editor-keyword: #F97583;
--vp-code-editor-tag: #85E89D;
--vp-code-editor-punctuation: #9ECBFF;
--vp-code-editor-definition: #B392F0;
--vp-code-editor-property: #79B8FF;
--vp-code-editor-static: #F78C6C;
--vp-code-editor-string: #9ECBFF;
}
.VPNavBarTitle .logo {
@@ -126,3 +152,52 @@
html:has(* .outline-link:target) {
scroll-behavior: smooth;
} */
.sp-wrapper .sp-layout {
border-radius: 8px;
}
.sp-wrapper .sp-tabs-scrollable-container {
border-radius: 8px 8px 0 0;
position: relative;
box-shadow: inset 0 -1px var(--vp-code-tab-divider);
margin-bottom: 0px;
margin-top: -1px;
height: 48px;
padding-bottom: 1px;
}
.sp-wrapper .sp-preview-container {
background-color: transparent;
}
.sp-wrapper .sp-tabs .sp-tab-button {
padding: 0 12px;
line-height: 48px;
height: 48px;
font-size: 14px;
font-weight: 500;
position: relative;
/* box-sizing: content-box; */
}
.sp-wrapper .sp-tabs .sp-tab-button:after {
position: absolute;
right: 8px;
left: 8px;
bottom: 0px;
z-index: 1;
height: 1px;
content: '';
background-color: transparent;
transition: background-color 0.25s;
}
.sp-wrapper .sp-tabs .sp-tab-button[data-active="true"] {
color: var(--vp-code-tab-active-text-color);
}
.sp-wrapper .sp-tabs .sp-tab-button[data-active="true"]:after {
background-color: var(--vp-code-tab-active-bar-color);
}

View File

@@ -44,3 +44,14 @@ export interface Release {
version: string
date: string
}
interface ShowcaseItemImage {
light: string
dark: string
}
export interface ShowcaseItem {
name: string
url: string
image: ShowcaseItemImage
}

View File

@@ -1,10 +1,18 @@
declare module "*.vue" {
import Vue from "vue";
declare module '*.vue' {
import Vue from 'vue';
export default Vue;
}
declare module "*.data.ts" {
declare module '*.data.ts' {
const data: any;
export { data };
}
declare module '*.wasm' {}
declare const resvg_wasm: RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
declare module 'node:module' {
function createRequire(filename: string): NodeRequire;
}

View File

@@ -3,8 +3,6 @@
The Lucide docs website is built with Vitepress: https://vitepress.dev/
This is Markdown-based documentation powered by Vue.
This is why this file is in txt format.
## Development
```sh

View File

@@ -0,0 +1,4 @@
# Accessibility
<!-- Description how you should use svg icons keeping web accessible -->
<!-- See @JanTrichter comment about some information to write this: https://github.com/lucide-icons/lucide/pull/1521#discussion_r1332141390 -->

View File

@@ -0,0 +1,13 @@
# Filled Icons
Fills are officially not supported.
However, all SVG properties are available on all icons.
Fill can still be used and will work fine on certain icons.
Example with stars:
<!-- Code Example with stars -->
## Will Lucide have fills in the future?
This feature is requested several times and discussion is happening at: [#458](https://github.com/lucide-icons/lucide/discussions/458).

View File

@@ -0,0 +1,52 @@
<script setup>
import { Sandpack } from 'sandpack-vue3'
import sandpackTheme from '../../.vitepress/theme/sandpackTheme.json'
import buttonExampleFiles from './examples/button-example/files.ts'
import iconColorExampleFiles from './examples/color-icon/files.ts'
</script>
# Color
By default, all icons have the color value: `currentColor`. This keyword uses the element's computed text `color` value to represent the icon color.
Read more about [ `currentColor` on MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#currentcolor_keyword).
## Adjust the color using the `color` prop
The color can be adjusted by passing the color prop to the element.
<Sandpack
template="react"
:theme="sandpackTheme"
:files="iconColorExampleFiles"
:customSetup='{
dependencies: {
"lucide-react": "latest"
}
}'
:options="{
editorHeight: 295,
editorWidthPercentage: 60,
}"
/>
## Using parent elements text color value
Because the color of lucide icons uses `currentColor`, the color of the icon depends on the computed `color` of the element, or it inherits it from its parent.
For example, if a parent element's color value is `#fff` and one of the children is a lucide icon, the color of the icon will be rendered as `#fff`. This is browser native behavior.
<Sandpack
template="react"
:theme="sandpackTheme"
:files="buttonExampleFiles"
:customSetup='{
dependencies: {
"lucide-react": "latest"
}
}'
:options="{
editorHeight: 320,
editorWidthPercentage: 60,
}"
/>

View File

@@ -0,0 +1,14 @@
import { RollerCoaster } from "lucide-react";
function App() {
return (
<div className="app">
<RollerCoaster
size={96}
absoluteStrokeWidth={true}
/>
</div>
);
}
export default App;

View File

@@ -0,0 +1,15 @@
import App from './App.js?raw'
import styles from '../styles.css?raw'
const files = {
'App.js': {
code: App,
active: true,
},
'styles.css': {
code:styles,
hidden: true
},
}
export default files

View File

@@ -0,0 +1,5 @@
import Button from "./Button";
export default function App() {
return <Button />;
}

View File

@@ -0,0 +1,12 @@
import { ThumbsUp } from "lucide-react";
function LikeButton() {
return (
<button style={{ color: "#fff" }}>
<ThumbsUp />
Like
</button>
);
}
export default LikeButton;

View File

@@ -0,0 +1,21 @@
import App from './App.js?raw'
import Button from './Button.jsx?raw'
import styles from '../styles.css?raw'
const files = {
'App.js': {
code: App,
hidden: true
},
'Button.jsx': {
code: Button,
active: true,
readOnly: false,
},
'styles.css': {
code:styles,
hidden: true
},
}
export default files

View File

@@ -0,0 +1,11 @@
import { Smile } from "lucide-react";
function App() {
return (
<div className="app">
<Smile color="#3e9392" />
</div>
);
}
export default App;

View File

@@ -0,0 +1,15 @@
import App from './App.js?raw'
import styles from '../styles.css?raw'
const files = {
'App.js': {
code: App,
active: true,
},
'styles.css': {
code:styles,
hidden: true
},
}
export default files

View File

@@ -0,0 +1,12 @@
import { Beer } from "lucide-react";
import "./icon.css";
function App() {
return (
<div className="app">
<Beer className="my-beer-icon" />
</div>
);
}
export default App;

View File

@@ -0,0 +1,21 @@
import App from './App.js?raw'
import styles from '../styles.css?raw'
import IconCss from './icon.css?raw'
const files = {
'icon.css': {
code: IconCss,
readOnly: false,
active: true,
},
'App.js': {
code: App,
},
'styles.css': {
code:styles,
hidden: true
},
}
export default files

View File

@@ -0,0 +1,5 @@
.my-beer-icon {
/* Change this! */
width: 64px;
height: 64px;
}

View File

@@ -0,0 +1,11 @@
import { Landmark } from "lucide-react";
function App() {
return (
<div className="app">
<Landmark size={64} />
</div>
);
}
export default App;

View File

@@ -0,0 +1,15 @@
import App from './App.js?raw'
import styles from '../styles.css?raw'
const files = {
'App.js': {
code: App,
active: true,
},
'styles.css': {
code:styles,
hidden: true
},
}
export default files

View File

@@ -0,0 +1,13 @@
import { Star } from "lucide-react";
import "./icon.css";
function App() {
return (
<div className="text-wrapper">
<Star class="my-icon" />
<div>Yes</div>
</div>
);
}
export default App;

View File

@@ -0,0 +1,21 @@
import App from './App.js?raw'
import styles from '../styles.css?raw'
import IconCss from './icon.css?raw'
const files = {
'icon.css': {
code: IconCss,
readOnly: false,
active: true,
},
'App.js': {
code: App,
},
'styles.css': {
code: styles,
hidden: true
},
}
export default files

View File

@@ -0,0 +1,15 @@
.my-icon {
/* Icon size will relative to font-size of .text-wrapper */
width: 1em;
height: 1em;
}
.text-wrapper {
/* Change this! */
font-size: 96px;
/* layout stuff */
display: flex;
gap: 0.25em;
align-items: center;
}

View File

@@ -0,0 +1,11 @@
import { PartyPopper } from "lucide-react";
function App() {
return (
<div>
<PartyPopper className="w-24 h-24" />
</div>
);
}
export default App;

View File

@@ -0,0 +1,15 @@
import App from './App.js?raw'
import styles from '../styles.css?raw'
const files = {
'App.js': {
code: App,
active: true
},
'styles.css': {
code:styles,
hidden: true
},
}
export default files

View File

@@ -0,0 +1,11 @@
import { FolderLock } from "lucide-react";
function App() {
return (
<div className="app">
<FolderLock strokeWidth={1} />
</div>
);
}
export default App;

View File

@@ -0,0 +1,15 @@
import App from './App.js?raw'
import styles from '../styles.css?raw'
const files = {
'App.js': {
code: App,
active: true,
},
'styles.css': {
code:styles,
hidden: true
},
}
export default files

View File

@@ -0,0 +1,50 @@
body {
font-family: sans-serif;
-webkit-font-smoothing: auto;
-moz-font-smoothing: auto;
-moz-osx-font-smoothing: grayscale;
font-smoothing: auto;
text-rendering: optimizeLegibility;
font-smooth: always;
-webkit-tap-highlight-color: transparent;
-webkit-touch-callout: none;
background: #202127;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
margin: 0;
color: #fff;
}
html,
body {
height: 100%;
min-height: 100%;
}
button {
display: flex;
align-items: center;
font-size: 18px;
padding: 10px 20px;
line-height: 24px;
gap: 8px;
border-radius: 24px;
outline: none;
border: none;
background: #111;
transition: all 0.3s ease;
}
button:hover {
background: #F56565;
}
.app {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 32px;
}

View File

@@ -0,0 +1,87 @@
<script setup>
import { Sandpack } from 'sandpack-vue3'
import sandpackTheme from '../../.vitepress/theme/sandpackTheme.json'
import sizeIconExample from './examples/size-icon-example/files.ts'
import sizeIconCssExample from './examples/size-icon-css-example/files.ts'
import sizeIconFontExample from './examples/size-icon-font-example/files.ts'
import sizeIconTailwind from './examples/size-icon-tailwind-example/files.ts'
</script>
# Sizing
By default, the size of all icons is `24px` by `24px`. The size is adjustable using the `size` prop and CSS.
## Adjusting the icon size using the `size` prop
<Sandpack
template="react"
:theme="sandpackTheme"
:files="sizeIconExample"
:customSetup='{
dependencies: {
"lucide-react": "latest"
}
}'
:options="{
editorHeight: 300,
editorWidthPercentage: 60,
}"
/>
## Adjusting the icon size via CSS
The CSS properties `width` and `height` can be used to adjust the icon size.
<Sandpack
template="react"
:theme="sandpackTheme"
:files="sizeIconCssExample"
:customSetup='{
dependencies: {
"lucide-react": "latest"
}
}'
:options="{
editorHeight: 300,
}"
/>
### Dynamically change the icon size based on the font size
It is possible to resize icons based on font size. This can be achieved using the `em` unit. See this [MDN article](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size#ems) for more information on the `em` unit.
<Sandpack
template="react"
:theme="sandpackTheme"
:files="sizeIconFontExample"
:customSetup='{
dependencies: {
"lucide-react": "latest"
}
}'
:options="{
editorHeight: 300,
}"
/>
### Resizing with Tailwind
`h-*` and `w-*` utilities can be used to adjust the size of the icon.
<Sandpack
template="react"
:theme="sandpackTheme"
:files="sizeIconTailwind"
:customSetup='{
dependencies: {
"lucide-react": "latest",
}
}'
:options="{
externalResources: ['https://cdn.tailwindcss.com'],
editorHeight: 300,
editorWidthPercentage: 60,
}"
/>
<!-- Code Example -->

View File

@@ -0,0 +1,60 @@
<script setup>
import { Sandpack } from 'sandpack-vue3'
import sandpackTheme from '../../.vitepress/theme/sandpackTheme.json'
import strokeWidth from './examples/stroke-width-icon/files.ts'
import absoluteStrokeWidth from './examples/absolute-stroke-width-icon/files.ts'
</script>
# Stroke width
All icons are designed with SVG elements using strokes.
These have a default stroke width of `2px`.
The `strokeWidth` can be adjusted to create a different look of the icons.
## Adjusting stroke width with `strokeWidth` prop
<Sandpack
template="react"
:theme="sandpackTheme"
:files="strokeWidth"
:customSetup='{
dependencies: {
"lucide-react": "latest"
}
}'
:options="{
editorHeight: 300,
editorWidthPercentage: 60,
}"
/>
## Absolute stroke width
When adjusting the `size` prop the size of the stroke width will be relative to the size of the icon, this is the default SVG behavior. The `absoluteStrokeWidth` prop is introduced to adjust this behavior to make the stroke width constant no matter the size of the icon.
This means that when `absoluteStrokeWidth` is enabled and the `size` of the icons is set to `48px` the `strokeWidth` will still be `2px` on the screen.
Note `2px` is the default stroke width for a Lucide icon, this can be adjusted to all sizes.
![Absolute stroke width comparison](../../images/absolute-stroke-width-compare.png?raw=true "Absolute stroke width comparison")
### Adjusting stroke width with `absoluteStrokeWidth` prop
Setting `absoluteStrokeWidth` to `true` will make the stroke width absolute.
<Sandpack
template="react"
:theme="sandpackTheme"
:files="absoluteStrokeWidth"
:customSetup='{
dependencies: {
"lucide-react": "latest"
}
}'
:options="{
editorHeight: 320,
editorWidthPercentage: 60,
}"
/>

View File

@@ -2,60 +2,113 @@
title: Icon Design Guide
---
# Icon Design Principles
## Icon Design Principles
Here are rules that should be followed to keep quality and consistency when making icons for Lucide.
## Summary of the rules we have
1. Icons must be designed on a **24 by 24 pixels** canvas.
2. Icons must have at least **1 pixel padding** within the canvas.
3. Icons must have a **stroke width of 2 pixels**.
4. Icons must use **round joins**.
5. Icons must use **round caps**.
6. Icons must use **centered strokes**.
7. Shapes (such as rectangles) in icons must have **border radius of 2 pixels**.
8. Distinct elements must have **2 pixels of spacing between each other**.
## The Rules Visualized
### 1. Icons must be designed on a 24 by 24 pixels canvas.
### 1. Icons must be designed on a **24 by 24 pixels** canvas.
![24px-24px](../../images/24px-24px.svg?raw=true "24px-24px")
### 2. Icons must have at least 1 pixel padding within the canvas.
### 2. Icons must have at least **1 pixel padding** within the canvas.
![1px-padding](../../images/1px-padding.svg?raw=true "1px-padding")
### 3. Icons must have a stroke width of 2 pixels.
### 3. Icons must have a **stroke width of 2 pixels**.
![2px-stroke](../../images/2px-stroke.svg?raw=true "2px-stroke")
### 4. Icons must use round joins.
### 4. Icons must use **round joins**.
![round-joints](../../images/round-joints.svg?raw=true "round-joints")
### 5. Icons must use round caps.
### 5. Icons must use **round caps**.
![round-caps](../../images/round-caps.svg?raw=true "round-caps")
### 6. Icons must use centered strokes.
### 6. Icons must use **centered strokes**.
![centered-strokes](../../images/centered-strokes.svg?raw=true "centered-strokes")
### 7. Shapes (such as squares) in icons must have border radius of 2 pixels.
### 7. Shapes (such as rectangles) must have a **border radius of**
#### A. **2 pixels** if they are at least 8 pixels in size
![2px-border-radius](../../images/2px-border-radius.svg?raw=true "2px-border-radius")
### 8. Distinct elements must have 2 pixels of spacing between each other.
#### B. **1 pixel** if they are smaller than 8 pixels in size
![1px-border-radius](../../images/1px-border-radius.svg?raw=true "1px-border-radius")
### 8. Distinct elements must have **2 pixels of spacing between each other**
![2px-element-spacing](../../images/2px-element-spacing.svg?raw=true "2px-element-spacing")
### 9. Icons should have a similar optical volume to `circle` and `square`.
![optical-volume-ideal](../../images/optical-volume-ideal.svg?raw=true "optical-volume-ideal")
![optical-volume-low](../../images/optical-volume-low.svg?raw=true "optical-volume-low")
![optical-volume-high](../../images/optical-volume-high.svg?raw=true "optical-volume-high")
**Tip:** place your icon next to circle or square and blur them both; your icon should not feel much darker than the base shape.
### 10. Icons should be visually centered by their center of gravity.
![visually-centered](../../images/visually-centered.svg?raw=true "visually-centered")
![visually-centered-bad](../../images/visually-centered-bad.svg?raw=true "visually-centered-bad")
**Tip:** place your icon both above/below and next to the square or circle icon and check if it feels off center. Symmetrical icons should always be aligned to the center.
### 11. Icons should have similar visual density and level of detail.
![density-ideal](../../images/density-ideal.svg?raw=true "density-ideal")
![density-high](../../images/density-high.svg?raw=true "density-high")
**Tip:** try to make abstractions to dense elements. Blur your icon, and when blurred it should not feel overly dark.
### 12. Continuous curves should join smoothly.
![curvature-smooth](../../images/curvature-smooth.svg?raw=true "curvature-smooth")
![curvature-uneven](../../images/curvature-uneven.svg?raw=true "curvature-uneven")
**Tip:** make sure to use arcs or quadratic curves, when using cubic curves control points should have mirrored angles for smooth curves.
### 13. Icons should aim to be pixel perfect so that they will be sharp on low DPI displays.
![pixel-perfection-ideal](../../images/pixel-perfection-ideal.svg?raw=true "pixel-perfection-ideal")
![pixel-perfection-bad](../../images/pixel-perfection-bad.svg?raw=true "pixel-perfection-bad")
**Tip:** whenever possible align elements and arc centers to the grid.
## Naming conventions
1. Icon names use lower kebab case.\
For example: `arrow-up` instead of `Arrow Up`.
2. Icon names use International English names, as opposed to local variants.\
For example: `color` instead of `colour`.
3. Icons should be named for what they depict rather than their use case or what they represent.\
For example: `floppy-disk` instead of `save` and `circle-slash` rather than `ban`.
4. Icons that are part of a group are named `<group>-<variant>`.\
For example: `badge-plus` is based on `badge`.
5. Icon names for alternate icons should represent what makes the alternate unique instead of being numbered.\
For example: `send-horizontal` instead of `send-2`.
6. Names containing numerals are not allowed, unless the number itself is represented in the icon.\
For example: `arrow-down-0-to-1` contains both numerals.
## Code Conventions
Before an icon is added to the library, we like to have readable and optimized svg code.
Never use [`<use>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/use). While it may sometimes seem like a good way to optimize file size, there's no way to ensure that the referenced element IDs will be unique once the SVGs are embedded in HTML documents.
Before an icon is added to the library, we like to have readable and optimized SVG code.
### Global Attributes
@@ -79,11 +132,26 @@ For each icon these attributes are applied, corresponding to the above rules.
### Minify paths
Code of paths can get really big.
To reduce file size we like to minify the code.
We recommend to use the [SVGOMG](https://jakearchibald.github.io/svgomg/) to minify paths.
The code of paths can sometimes get quite large. To reduce file size we like to minify the code.
We recommend to use the [SVGOMG](https://jakearchibald.github.io/svgomg/) to minify paths to 2 points of precision.
### JSON metadata descriptor
### Allowed elements
SVG files may only contain simple path and shape elements, which may not have any attributes other than sizing and spacing.\
In practice only the following elements and attributes are allowed:
* `<path d>`
* `<line x1 x2>`
* `<polygon points>`
* `<polyline points>`
* `<circle cx cy r>`
* `<ellipse cx cy rx ry>`
* `<rect x y width height rx>`
This also means that no transforms, filters, fills or explicit strokes are allowed.
Never use [`<use>`](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/use). While it may sometimes seem like a good way to optimize file size, there's no way to ensure that the referenced element IDs will be unique once the SVGs are embedded in HTML documents.
## JSON metadata descriptor
Each icon added must also come with a matching JSON file listing tags and categories for the icon.
Please use the following template:
@@ -91,6 +159,10 @@ Please use the following template:
```json
{
"$schema": "../icon.schema.json",
"contributors": [
"github-username",
"another-github-username"
],
"tags": [
"foo",
"bar"

View File

@@ -14,15 +14,15 @@ The Illustrator template is created following guidelines from the [Icon Design G
**Workflow:**
1. Download and open the [Illustrator template](https://github.com/lucide-icons/lucide/blob/main/docs/templates/illustrator_template.ai).
1. Download and open the [Illustrator template](https://github.com/lucide-icons/lucide/blob/main/docs/public/templates/illustrator_template.ai).
2. You can now remove the content from the example logo layer ("Draw") and start creating.
3. Verify that you follow the [Icon Design Guidelines](icon-design-guide.md).
4. Before you export the file as an SVG make sure to check that you followed the guidelines and remove all unecessary layers (especially "Padding" and "Grid").
4. Before you export the file as an SVG make sure to check that you followed the guidelines and remove all unnecessary layers (especially "Padding" and "Grid").
5. Export the file with the export menu under: `Export > Export As..` than safe the file as SVG. Select the following options in the SVG Options dialog:
5. Export the file with the export menu under: `Export > Export As..` then save the file as SVG. Select the following options in the SVG Options dialog:
![SVG export options in Illustrator](../../images/illustrator-svg-options.png?raw=true "Setting Page Size")

View File

@@ -0,0 +1 @@
# How to use icons

View File

@@ -1,8 +0,0 @@
# lucide_icons
Lucide Icons ([lucide.dev](https://lucide.dev)) for Flutter. Visit the website for the full list of icons
## Example
```dart
Icon(LucideIcons.activity);
```

View File

@@ -26,9 +26,9 @@ npm install lucide-preact
## How to use
It's build with ES Modules so it's completely tree-shakable.
Lucide is built with ES Modules, so it's completely tree-shakable.
Each icon can be imported as a Preact component, what renders a 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.
Each icon can be imported as a Preact 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
@@ -56,7 +56,7 @@ export default App;
### Applying props
To apply custom props to change the look of the icon, this can be done by simply pass them as props to the component. All SVG attributes are available as props to style the SVGs. See the list of SVG Presentation Attributes on [MDN](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/Presentation).
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).
```jsx
// Usage
@@ -69,10 +69,10 @@ const App = () => {
## One generic icon component
It is possible to create one generic icon component to load icons. It's not recommended.
It is possible to create one generic icon component to load icons, but it is not recommended.
::: danger
Example below importing all ES Modules, caution using this example. All icons will be imported. When using bundlers like: `Webpack`, `Rollup` or `Vite` the application build size will grow strongly and harming the performance the application.
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, negatively affecting its performance. This is especially important when using bundlers like `Webpack`, `Rollup`, or `Vite`.
:::
### Icon Component Example

View File

@@ -4,7 +4,7 @@ Implementation of the lucide icon library for React Native applications
## Installation
First, ensure that you have `react-native-svg@^12.0.0` installed. Then, install the package:
First, ensure that you have `react-native-svg` (version between 12 and 14) installed. Then, install the package:
::: code-group
@@ -52,7 +52,7 @@ export default App;
### Applying props
To apply custom props to change the look of the icon, this can be done by simply pass them as props to the component.
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.
```jsx
// Usage
@@ -63,10 +63,10 @@ const App = () => {
## One generic icon component
It is possible to create one generic icon component to load icons.
It is possible to create one generic icon component to load icons, but it is not recommended.
::: warning
Example below importing all ES Modules, caution using this example. All icons will be imported. When using bundlers like: `Webpack`, `Rollup` or `Vite` the application build size will grow strongly and harming the performance the application.
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, negatively affecting its performance. This is especially important to keep in mind when using bundlers like `Webpack`, `Rollup`, or `Vite`.
:::
### Icon Component Example

View File

@@ -22,9 +22,9 @@ npm install lucide-react
## How to use
It's build with ES Modules so it's completely tree-shakable.
Lucide is built with ES Modules, so it's completely tree-shakable.
Each icon can be imported as a React component, what renders a 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.
Each icon can be imported as a React 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
@@ -52,7 +52,7 @@ export default App;
### Applying props
To apply custom props to change the look of the icon, this can be done by simply pass them as props to the component. All SVG attributes are available as props to style the SVGs. See the list of SVG Presentation Attributes on [MDN](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/Presentation).
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).
```jsx
// Usage
@@ -63,10 +63,10 @@ const App = () => {
## One generic icon component
It is possible to create one generic icon component to load icons. It's not recommended.
It is possible to create one generic icon component to load icons, but it is not recommended.
::: danger
Example below importing all ES Modules, caution using this example. All icons will be imported. When using bundlers like: `Webpack`, `Rollup` or `Vite` the application build size will grow strongly and harming the performance the application.
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, negatively affecting its performance. This is especially important to keep in mind when using bundlers like `Webpack`, `Rollup`, or `Vite`.
This is not the case for the latest NextJS, because it uses server side rendering. The icons will be streamed to the client when needed. For NextJS with Dynamic Imports, see [dynamic imports](#nextjs-example) section for more information.
:::
@@ -99,9 +99,7 @@ export default App;
#### With Dynamic Imports
> :warning: This is experimental and only works with bundlers that support dynamic imports.
Lucide react exports a dynamic import map `dynamicIconImports`. 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.
Lucide react exports a dynamic import map `dynamicIconImports`, which 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.
When using client side rendering, it will fetch the icon component when it's needed. This will reduce the initial bundle size.
@@ -134,7 +132,21 @@ export default Icon
##### NextJS Example
In NextJS [the dynamic function](https://nextjs.org/docs/pages/building-your-application/optimizing/lazy-loading#nextdynamic) can be used to load the icon component dynamically.
In NextJS, [the dynamic function](https://nextjs.org/docs/pages/building-your-application/optimizing/lazy-loading#nextdynamic) can be used to dynamically load the icon component.
To make dynamic imports work with NextJS, you need to add `lucide-react` to the [`transpilePackages`](https://nextjs.org/docs/app/api-reference/next-config-js/transpilePackages) option in your `next.config.js` like this:
```js
/** @type {import('next').NextConfig} */
const nextConfig = {
transpilePackages: ['lucide-react'] // add this
}
module.exports = nextConfig
```
You can then start using it:
```tsx
import dynamic from 'next/dynamic'

View File

@@ -22,9 +22,9 @@ npm install lucide-solid
## How to use
It's build with ES Modules so it's completely tree-shakable.
Lucide is built with ES Modules, so it's completely tree-shakable.
Each icon can be imported as a Solid component, what renders a 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.
Each icon can be imported as a Solid 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
@@ -52,7 +52,7 @@ export default App;
### Applying props
To apply custom props to change the look of the icon, this can be done by simply pass them as props to the component. All SVG attributes are available as props to style the SVGs. See the list of SVG Presentation Attributes on [MDN](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/Presentation).
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).
```jsx
// Usage
@@ -66,7 +66,7 @@ const App = () => {
It is possible to create one generic icon component to load icons. It's not recommended.
::: danger
Example below importing all ES Modules, caution using this example. All icons will be imported. When using bundlers like: `Webpack`, `Rollup` or `Vite` the application build size will grow strongly and harming the performance the application.
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, negatively affecting its performance. This is especially important to keep in mind when using bundlers like `Webpack`, `Rollup`, or `Vite`.
:::
### Icon Component Example

View File

@@ -22,9 +22,9 @@ npm install lucide-svelte
## How to use
It's build with ES Modules so it's completely tree-shakable.
Lucide is built with ES Modules, so it's completely tree-shakable.
Each icon can be imported as a Svelte component, what renders a 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.
Each icon can be imported as a Svelte 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
@@ -59,7 +59,7 @@ Additional props can be passed to adjust the icon:
### Applying props
To apply custom props to change the look of the icon, this can be done by simply pass them as props to the component. All SVG attributes are available as props to style the SVGs. See the list of SVG Presentation Attributes on [MDN](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/Presentation).
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).
```svelte
<script>
@@ -73,10 +73,10 @@ This results a filled phone icon.
## One generic icon component
It is possible to create one generic icon component to load icons. It's not recommended.
It is possible to create one generic icon component to load icons, but it is not recommended.
::: danger
Example below importing all ES Modules, caution using this example. All icons will be imported. When using bundlers like: `Webpack`, `Rollup` or `Vite` the application build size will grow strongly and harming the performance the application.
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, negatively affecting its performance. This is especially important when using bundlers like `Webpack`, `Rollup`, or `Vite`.
:::
### Icon Component Example

Some files were not shown because too many files have changed in this diff Show More