NanashiandEric Fennis 390e824cfe feat(site): Preselect external libraries via ?library= URL param (#5180)
* feat(site): Preselect external libraries via `?library=` URL param

Opening /icons/?library=lab now enables the Lab library on load, and
toggling the checkbox keeps the address bar in sync, so the current
selection can be shared as a link.

- Repeated params (?library=a&library=b) and comma lists are accepted;
  unknown values and duplicates are dropped.
- The param is applied in onMounted rather than during setup, so the
  fetch watchers already exist and hydration doesn't mismatch on the
  checkbox.
- The URL is updated with replaceState, preserving history.state and
  other params such as ?search=.

* fix(site): Keep `?library=` across navigation and the icon drawer

The library param was only read on the first mount and was dropped by
the icon drawer, so it stopped matching the selection:

- /icons/?library=lab -> Categories -> uncheck Lab -> Back restored
  ?library=lab in the URL but left nothing selected.
- Opening and closing an icon drawer on desktop kept Lab selected but
  removed ?library= from the URL, so sharing or refreshing lost it.

Now the selection is reconciled with the URL on every mount and on
popstate: a valid ?library= wins, and when the URL has none but a
library is selected, the param is written back with replaceState.
The drawer's pushState calls in IconItem.vue and IconsOverview.vue
keep the param via a new setLibraryParams helper.

* Add localstorage

* Refactor code

---------

Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2026-11-19 14:47:14 +01:00
2026-03-20 16:30:53 +01:00
2026-11-16 12:34:15 +01:00
2026-11-02 12:21:25 +01:00

Lucide - Beautiful & consistent icon toolkit made by the community. Open-source project and a fork of Feather Icons.

license figma installs build status discord chat

Icons · Guide · Packages · License · Showcase

Lucide

Lucide is an open-source icon library that provides 1600+ vector (svg) files for displaying icons and symbols in digital and non-digital projects. The library aims to make it easier for designers and developers to incorporate icons into their projects by providing several official packages to make it easier to use these icons in your project.

Packages

Logo Package Version Downloads Links
JS logo lucide npm NPM Downloads Docs · Source
React logo lucide-react npm NPM Downloads Docs · Source
Vue logo @lucide/vue npm NPM Downloads Docs · Source
Svelte logo @lucide/svelte npm NPM Downloads Docs · Source
Solid logo lucide-solid npm NPM Downloads Docs · Source
Preact logo lucide-preact npm NPM Downloads Docs · Source
React Native logo lucide-react-native npm NPM Downloads Docs · Source
Angular logo @lucide/angular npm NPM Downloads Docs · Source
Astro logo @lucide/astro npm NPM Downloads Docs · Source
SVG logo lucide-static npm NPM Downloads Docs · Source

Figma

The Lucide Figma plugin.

Visit Figma community page to install the plugin.

Figma Lucide Cover

Contributing

For more info on how to contribute please see the contribution guidelines.

Caught a mistake or want to contribute to the documentation? Edit this page on Github

About brand logos

Lucide does not accept brand logos, and we do not plan to add them in the future. This is due to a combination of legal restrictions, design consistency concerns, and practical maintenance reasons.

Click here to read our official statement about brand logos in Lucide.

Community

Join the community on our Discord server!

License

Lucide is totally free for commercial use and personal use, this software is licensed under the ISC License.

Credits

Thank you to all the people who contributed to Lucide!

Sponsors

Powered by Vercel

Bronze 🥉

Sourcegraph – Understand, fix, and automate across your codebase with Sourcegraph's code intelligence platform    Zephyr Cloud

Backers 🍺

Pax Historia    pdfme – Free and Open source PDF generation library!

Supporters ☕️

Fina Money – Build the most flexible finance tracker    Ruud

Other contributors 💸

You can find all our past and non-recurring financial contributors at our Open Collective page.

Languages
TypeScript 91.1%
JavaScript 7.3%
Svelte 0.7%
Vue 0.5%
HTML 0.3%
Other 0.1%