lucide/docs
Nanashi 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
..
.vitepress feat(site): Preselect external libraries via ?library= URL param (#5180) 2026-11-19 14:47:14 +01:00
contribute chore(icons): Renamed *-warning and *-alert to *-exclamation-point (#5143) 2026-11-03 15:49:26 +01:00
guide fix(lucide-static): add icon aliases to the SVG sprite (#5200) 2026-11-16 10:25:14 +01:00
how-to feat(docs): added "How to use Lucide icons" section to resources (#4829) 2026-09-10 16:07:18 +02:00
icons feat(docs): Adds search field to docs pages (#5012) 2026-10-16 15:22:57 +02:00
images feat(docs): added "How to use Lucide icons" section to resources (#4829) 2026-09-10 16:07:18 +02:00
public feat(site): Add sponsor page (#5132) 2026-11-02 12:21:25 +01:00
scripts perf(site): cache related icon names and reuse search indexes (#5123) 2026-11-16 15:59:56 +01:00
waitlist feat(docs|site): Add MCP waitlist page (#5249) 2026-11-17 14:52:12 +01:00
brand-logo-statement.md docs(version-1): Version 1 website (#4142) 2026-03-20 17:04:28 +01:00
code-of-conduct.md docs(version-1): Version 1 website (#4142) 2026-03-20 17:04:28 +01:00
community.md feat(docs): added better contribution guide (#4746) 2026-09-04 12:24:52 +02:00
index.md Add missing titles and unify title template (#3920) 2026-01-02 08:46:32 +01:00
license.md chore(docs): Improve SEO icon detail pages (#4040) 2026-01-29 16:19:32 +01:00
mcp.md feat(docs|site): Add MCP waitlist page (#5249) 2026-11-17 14:52:12 +01:00
nitro.config.ts docs(version-1): Version 1 website (#4142) 2026-03-20 17:04:28 +01:00
package.json feat(docs|site): Add MCP waitlist page (#5249) 2026-11-17 14:52:12 +01:00
packages.md feat(packages): extract icon build logic into @lucide/shared (#4409) 2026-09-04 16:38:01 +02:00
privacy.md feat(docs|site): Add MCP waitlist page (#5249) 2026-11-17 14:52:12 +01:00
README.md
showcase.md feat(packages): extract icon build logic into @lucide/shared (#4409) 2026-09-04 16:38:01 +02:00
sponsor.md feat(site): Add sponsor page (#5132) 2026-11-02 12:21:25 +01:00
tsconfig.json feat(site): Better icon detail page and add unreleased flag (#4877) 2026-09-18 14:22:47 +02:00
vercel.json feat(docs|site): Add MCP waitlist page (#5249) 2026-11-17 14:52:12 +01:00

Lucide Docs website

The Lucide docs website is built with Vitepress: https://vitepress.dev/ This is Markdown-based documentation powered by Vue.

Development

# Install dependencies
pnpm install
# Start docs dev server
pnpm docs:dev

# Start api dev server
pnpm dev

Build

# Build docs
pnpm docs:build
# Build api
pnpm build:api

Components

See .vitepress directory.