Files
lucide/packages/svelte
Ken Kunz 6fd4f5173c Allow string values for size and strokeWidth in icon contexts
The global icon context types declare `size` and `strokeWidth` as `number`,
while the component props they supply defaults for accept `number | string`.
The context value is passed through to the component untouched, so a CSS
length that works on a single icon is rejected when set as a default:

    setLucideProps({ size: '1em' });  // Type 'string' is not assignable to 'number'
    <Moon size="1em" />               // same value, same code path, no error
2026-09-15 22:48:50 -05:00
..

Lucide icon library for Svelte 5 applications.

Lucide icon library for Svelte 5 applications.

npm NPM Downloads License

About · Icons · Documentation · License

Lucide Svelte

Implementation of the Lucide icon library for svelte applications.

Installation

pnpm add @lucide/svelte
npm install @lucide/svelte
yarn add @lucide/svelte
bun add @lucide/svelte

@lucide/svelte is only for Svelte 5, for Svelte 4 use the lucide-svelte package.

Documentation

For full documentation, visit lucide.dev

Community

Join the Discord server to chat with the maintainers and other users.

License

Lucide is licensed under the ISC license. See LICENSE.

Sponsors

Powered by Vercel

DigitalOcean Referral Badge

Hero backers 🦸

Zephyr Cloud – From idea to prod: fast micro-frontend delivery!

Awesome backers 🍺

pdfme – Open-source PDF generation library built with TypeScript and React. Pax Historia – An alternate history sandbox game

Backers ☕

Fina Money – Modular Finance Tracker

Other contributors 💸

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