{"_id":"astro-iconset","_rev":"7-45c2becb6f711b69ccdb399ffb9650a8","name":"astro-iconset","dist-tags":{"latest":"0.0.6"},"versions":{"0.0.1":{"name":"astro-iconset","version":"0.0.1","keywords":[],"author":"","license":"ISC","_id":"astro-iconset@0.0.1","maintainers":[{"name":"sudeep2003","email":"sudipkr47@gmail.com"}],"dist":{"shasum":"0cada89fa0904369de39d818736d30776fea14c2","tarball":"https://registry.npmjs.org/astro-iconset/-/astro-iconset-0.0.1.tgz","fileCount":1,"integrity":"sha512-xlrSQew4lLDv7mLD2n+fqc4fGUMdD9+D3pAibAaWVdBglPap8IPi+n9wJ7Y2bw9MQSWL1vMMS7SMw8NymPGZkg==","signatures":[{"sig":"MEQCIHfP8zTHY+uOcUr6W8VEp9kfzd8DkWrx0XvQgMlHtvkdAiAqqhOqtJEu6F95Zu6div2qs/7ecHRjTOpuP12ubbTiFw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":249},"main":"index.js","type":"commonjs","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"sudeep2003","email":"sudipkr47@gmail.com"},"deprecated":"placeholder release, use 0.0.2+","_npmVersion":"11.6.2","description":"","directories":{},"_nodeVersion":"24.14.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/astro-iconset_0.0.1_1773677301431_0.2682232955766275","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"astro-iconset","version":"0.0.2","keywords":["astro","withastro","astro-integration","astro-component","image","images","icon","icons","iconify","optimization"],"author":{"url":"https://github.com/sudeep2003","name":"Sudeep"},"license":"MIT","_id":"astro-iconset@0.0.2","maintainers":[{"name":"sudeep2003","email":"sudipkr47@gmail.com"}],"homepage":"https://github.com/sudeep2003/astro-iconset#readme","bugs":{"url":"https://github.com/sudeep2003/astro-iconset/issues"},"dist":{"shasum":"09ff1da4cff82bde982d581378fb6151ea7d88ae","tarball":"https://registry.npmjs.org/astro-iconset/-/astro-iconset-0.0.2.tgz","fileCount":54,"integrity":"sha512-1VuHzRDtfK+waGg1HrLYoZ5j5sBKl5L7/T9nSCz/bVOOjPsHlz2kh7ZrSXxNIUPZ7a6XLYHgBtT5B46V4EhQKQ==","signatures":[{"sig":"MEQCIFbKa/lEKGDl3chp2kERlUr+nIz2T3JDb/h2TDNXdNZkAiBrmxwbNkmO33gh4jVZP43NdUI5fJKGlguHsUknLDLiNg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":79718},"type":"module","_from":"file:astro-iconset-0.0.2.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./vue":{"types":"./components/vue/index.ts","default":"./components/vue/index.ts"},"./react":{"types":"./components/react/index.ts","default":"./components/react/index.ts"},"./solid":{"types":"./components/solid/index.ts","default":"./components/solid/index.ts"},"./preact":{"types":"./components/preact/index.ts","default":"./components/preact/index.ts"},"./svelte":{"types":"./components/svelte/index.ts","default":"./components/svelte/index.ts"},"./svg-icon":{"types":"./typings/svg-icon.d.ts"},"./components":"./components/index.ts"},"scripts":{"dev":"tsc --watch","build":"tsc","start":"pnpm run dev"},"_npmUser":{"name":"sudeep2003","email":"sudipkr47@gmail.com"},"_resolved":"C:\\Users\\Sudeep\\AppData\\Local\\Temp\\e9a5cd142717dedaf452068c81c6e30b\\astro-iconset-0.0.2.tgz","_integrity":"sha512-1VuHzRDtfK+waGg1HrLYoZ5j5sBKl5L7/T9nSCz/bVOOjPsHlz2kh7ZrSXxNIUPZ7a6XLYHgBtT5B46V4EhQKQ==","repository":{"url":"git+https://github.com/sudeep2003/astro-iconset.git","type":"git","directory":"packages/astro-iconset"},"_npmVersion":"11.6.2","description":"SVG icon integration for Astro — local icons, Iconify sets, sprite deduplication, and zero browser runtime.","directories":{},"_nodeVersion":"24.14.0","dependencies":{"@iconify/tools":"^5.0.6","@iconify/types":"^2.0.0","@iconify/utils":"^3.1.0"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^7.0.0","astro":"^6.0.0","typescript":"^5.0.4","@types/node":"^22.0.0","@types/react":"^18.3.28","@iconify-json/ri":"*","@types/react-dom":"^18.3.7"},"peerDependencies":{"vue":">=3.0.0","astro":">=3.5.0","react":">=18.0.0","preact":">=10.0.0","svelte":">=4.0.0","solid-js":">=1.0.0","react-dom":">=18.0.0"},"peerDependenciesMeta":{"vue":{"optional":true},"react":{"optional":true},"preact":{"optional":true},"svelte":{"optional":true},"solid-js":{"optional":true},"react-dom":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/astro-iconset_0.0.2_1775895396761_0.35219402602759264","host":"s3://npm-registry-packages-npm-production"}},"0.0.3":{"name":"astro-iconset","version":"0.0.3","keywords":["astro","withastro","astro-integration","astro-component","image","images","icon","icons","iconify","optimization"],"author":{"url":"https://github.com/sudeep2003","name":"Sudeep"},"license":"MIT","_id":"astro-iconset@0.0.3","maintainers":[{"name":"sudeep2003","email":"sudipkr47@gmail.com"}],"homepage":"https://github.com/sudeep2003/astro-iconset#readme","bugs":{"url":"https://github.com/sudeep2003/astro-iconset/issues"},"dist":{"shasum":"d18e1db3ffaf27277d5ff98d497d2db55c635b1d","tarball":"https://registry.npmjs.org/astro-iconset/-/astro-iconset-0.0.3.tgz","fileCount":54,"integrity":"sha512-dt+Gta3fYlSUoGjv8Nfjcs5n6z/OhCtRelsXQ/CZnoKjXLBXNIpry4824iHvB8n8BA4roQI9zPo+oNciGxokSA==","signatures":[{"sig":"MEYCIQCrjF4YkvLLk2m8t25d6Bt6asbGPphA0JSGZz8conspkgIhAN0VO/LvebRdi8lxJNfrrCq/tPIyXm0f3K9+sI/9YbNN","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":80917},"type":"module","_from":"file:astro-iconset-0.0.3.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./vue":{"types":"./components/vue/index.ts","default":"./components/vue/index.ts"},"./react":{"types":"./components/react/index.ts","default":"./components/react/index.ts"},"./solid":{"types":"./components/solid/index.ts","default":"./components/solid/index.ts"},"./preact":{"types":"./components/preact/index.ts","default":"./components/preact/index.ts"},"./svelte":{"types":"./components/svelte/index.ts","default":"./components/svelte/index.ts"},"./svg-icon":{"types":"./typings/svg-icon.d.ts"},"./components":"./components/index.ts"},"scripts":{"dev":"tsc --watch","build":"tsc","start":"pnpm run dev"},"_npmUser":{"name":"sudeep2003","email":"sudipkr47@gmail.com"},"_resolved":"C:\\Users\\Sudeep\\AppData\\Local\\Temp\\0792810bcead7d6c563240b582047eef\\astro-iconset-0.0.3.tgz","_integrity":"sha512-dt+Gta3fYlSUoGjv8Nfjcs5n6z/OhCtRelsXQ/CZnoKjXLBXNIpry4824iHvB8n8BA4roQI9zPo+oNciGxokSA==","repository":{"url":"git+https://github.com/sudeep2003/astro-iconset.git","type":"git","directory":"packages/astro-iconset"},"_npmVersion":"11.6.2","description":"SVG icon integration for Astro — local icons, Iconify sets, sprite deduplication, and zero browser runtime.","directories":{},"_nodeVersion":"24.14.0","dependencies":{"@iconify/tools":"^5.0.6","@iconify/types":"^2.0.0","@iconify/utils":"^3.1.0"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^7.0.0","astro":"^6.0.0","typescript":"^5.0.4","@types/node":"^22.0.0","@types/react":"^18.3.28","@iconify-json/ri":"*","@types/react-dom":"^18.3.7"},"peerDependencies":{"vue":">=3.0.0","astro":">=3.5.0","react":">=18.0.0","preact":">=10.0.0","svelte":">=4.0.0","solid-js":">=1.0.0","react-dom":">=18.0.0"},"peerDependenciesMeta":{"vue":{"optional":true},"react":{"optional":true},"preact":{"optional":true},"svelte":{"optional":true},"solid-js":{"optional":true},"react-dom":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/astro-iconset_0.0.3_1775922757549_0.9525366997450928","host":"s3://npm-registry-packages-npm-production"}},"0.0.4":{"name":"astro-iconset","version":"0.0.4","keywords":["astro","withastro","astro-integration","astro-component","image","images","icon","icons","iconify","optimization"],"author":{"url":"https://github.com/sudeep2003","name":"Sudeep"},"license":"MIT","_id":"astro-iconset@0.0.4","maintainers":[{"name":"sudeep2003","email":"sudipkr47@gmail.com"}],"homepage":"https://github.com/sudeep2003/astro-iconset#readme","bugs":{"url":"https://github.com/sudeep2003/astro-iconset/issues"},"dist":{"shasum":"c654685e340e76fa9a4b16549447d5810580b941","tarball":"https://registry.npmjs.org/astro-iconset/-/astro-iconset-0.0.4.tgz","fileCount":66,"integrity":"sha512-r82jgt8FUzcT+swZrj16lCn4IYHIbEfY3mZpA2iDo52HFRr81Fdc5mJEctl+eLMEdNCsGV1HKxwY1/zVEH4sDw==","signatures":[{"sig":"MEQCIB93AiHoIAv79JdmkKQeQAk1tn3a/1pmb0FVSFrv26JiAiAuGXLGxe7N/pRq1GICCw/bJ+prrOW4jeNWi0vL5ZqduQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":92659},"type":"module","_from":"file:astro-iconset-0.0.4.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./vue":{"types":"./components/vue/index.ts","default":"./components/vue/index.ts"},"./react":{"types":"./components/react/index.ts","default":"./components/react/index.ts"},"./solid":{"types":"./components/solid/index.ts","default":"./components/solid/index.ts"},"./preact":{"types":"./components/preact/index.ts","default":"./components/preact/index.ts"},"./svelte":{"types":"./components/svelte/index.ts","default":"./components/svelte/index.ts"},"./svg-icon":{"types":"./typings/svg-icon.d.ts"},"./components":"./components/index.ts"},"scripts":{"dev":"tsc --watch","build":"tsc","start":"pnpm run dev"},"_npmUser":{"name":"sudeep2003","email":"sudipkr47@gmail.com"},"_resolved":"C:\\Users\\Sudeep\\AppData\\Local\\Temp\\56d8743665176d41d8c8bda7300bf910\\astro-iconset-0.0.4.tgz","_integrity":"sha512-r82jgt8FUzcT+swZrj16lCn4IYHIbEfY3mZpA2iDo52HFRr81Fdc5mJEctl+eLMEdNCsGV1HKxwY1/zVEH4sDw==","repository":{"url":"git+https://github.com/sudeep2003/astro-iconset.git","type":"git","directory":"packages/astro-iconset"},"_npmVersion":"11.6.2","description":"SVG icon integration for Astro — local icons, Iconify sets, sprite deduplication, and zero browser runtime.","directories":{},"_nodeVersion":"24.14.0","dependencies":{"@iconify/tools":"^5.0.6","@iconify/types":"^2.0.0","@iconify/utils":"^3.1.0"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^7.0.0","astro":"^6.0.0","typescript":"^5.0.4","@types/node":"^22.0.0","@types/react":"^18.3.28","@iconify-json/ri":"*","@types/react-dom":"^18.3.7"},"peerDependencies":{"vue":">=3.0.0","astro":">=3.5.0","react":">=18.0.0","preact":">=10.0.0","svelte":">=4.0.0","solid-js":">=1.0.0","react-dom":">=18.0.0"},"peerDependenciesMeta":{"vue":{"optional":true},"react":{"optional":true},"preact":{"optional":true},"svelte":{"optional":true},"solid-js":{"optional":true},"react-dom":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/astro-iconset_0.0.4_1776629196654_0.6585045155756641","host":"s3://npm-registry-packages-npm-production"}},"0.0.5":{"name":"astro-iconset","version":"0.0.5","keywords":["astro","withastro","astro-integration","astro-component","image","images","icon","icons","iconify","optimization"],"author":{"url":"https://github.com/sudeep2003","name":"Sudeep"},"license":"MIT","_id":"astro-iconset@0.0.5","maintainers":[{"name":"sudeep2003","email":"sudipkr47@gmail.com"}],"homepage":"https://github.com/sudeep2003/astro-iconset#readme","bugs":{"url":"https://github.com/sudeep2003/astro-iconset/issues"},"dist":{"shasum":"eb249a4e3b1132edb7e0d7b03354eddd0e696f31","tarball":"https://registry.npmjs.org/astro-iconset/-/astro-iconset-0.0.5.tgz","fileCount":35,"integrity":"sha512-Tp+GpElt+ioYqMAiV7CErTw/8Vwn72sst5uwWha0wQ/V0+MSDFkedI6w5mGpGtoc8ojYt+Z/B0+9hqZ9pT9bOw==","signatures":[{"sig":"MEYCIQD3ZLTvRxKWSXm5wRhNok0RfHRluci59T79qrQcTGox8QIhAMx12MaQ9UJFkmBYXxI8PQ7NUzLD1lwTyHUi21D40z6E","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":51431},"type":"module","_from":"file:astro-iconset-0.0.5.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./vue":{"types":"./components/vue/index.ts","default":"./components/vue/index.ts"},"./react":{"types":"./components/react/index.ts","default":"./components/react/index.ts"},"./solid":{"types":"./components/solid/index.ts","default":"./components/solid/index.ts"},"./preact":{"types":"./components/preact/index.ts","default":"./components/preact/index.ts"},"./svelte":{"types":"./components/svelte/index.ts","default":"./components/svelte/index.ts"},"./svg-icon":{"types":"./typings/svg-icon.d.ts"},"./components":"./components/index.ts"},"scripts":{"dev":"tsc --watch","test":"vitest run","build":"tsc","start":"pnpm run dev"},"_npmUser":{"name":"sudeep2003","email":"sudipkr47@gmail.com"},"_resolved":"C:\\Users\\Sudeep\\AppData\\Local\\Temp\\686dd8b2ea664cf94bcc7a0f836af095\\astro-iconset-0.0.5.tgz","_integrity":"sha512-Tp+GpElt+ioYqMAiV7CErTw/8Vwn72sst5uwWha0wQ/V0+MSDFkedI6w5mGpGtoc8ojYt+Z/B0+9hqZ9pT9bOw==","repository":{"url":"git+https://github.com/sudeep2003/astro-iconset.git","type":"git","directory":"packages/astro-iconset"},"_npmVersion":"11.6.2","description":"SVG icon integration for Astro — local icons, Iconify sets, sprite deduplication, and zero browser runtime.","directories":{},"_nodeVersion":"24.14.0","dependencies":{"@iconify/tools":"^5.0.6","@iconify/types":"^2.0.0","@iconify/utils":"^3.1.0"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^7.0.0","astro":"^6.0.0","vitest":"^3.0.0","typescript":"^5.0.4","@types/node":"^22.0.0","@types/react":"^18.3.28","@iconify-json/ri":"*","@types/react-dom":"^18.3.7"},"peerDependencies":{"vue":">=3.0.0","astro":">=3.5.0","react":">=18.0.0","preact":">=10.0.0","svelte":">=4.0.0","solid-js":">=1.0.0","react-dom":">=18.0.0"},"peerDependenciesMeta":{"vue":{"optional":true},"react":{"optional":true},"preact":{"optional":true},"svelte":{"optional":true},"solid-js":{"optional":true},"react-dom":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/astro-iconset_0.0.5_1778703765762_0.5498314359590311","host":"s3://npm-registry-packages-npm-production"}},"0.0.6":{"name":"astro-iconset","description":"SVG icon integration for Astro — local icons, Iconify sets, sprite deduplication, and zero browser runtime.","version":"0.0.6","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./components":"./components/index.ts","./react":{"types":"./components/react/index.ts","default":"./components/react/index.ts"},"./vue":{"types":"./components/vue/index.ts","default":"./components/vue/index.ts"},"./svelte":{"types":"./components/svelte/index.ts","default":"./components/svelte/index.ts"},"./preact":{"types":"./components/preact/index.ts","default":"./components/preact/index.ts"},"./solid":{"types":"./components/solid/index.ts","default":"./components/solid/index.ts"},"./svg-icon":{"types":"./typings/svg-icon.d.ts"}},"scripts":{"build":"tsc","dev":"tsc --watch","start":"pnpm run dev","test":"vitest run","test:watch":"vitest","test:coverage":"vitest run --coverage","prepublishOnly":"pnpm run test && pnpm run build"},"author":{"name":"Sudeep","url":"https://github.com/sudeep2003"},"keywords":["astro","withastro","astro-integration","astro-component","image","images","icon","icons","iconify","optimization"],"repository":{"type":"git","url":"git+https://github.com/sudeep2003/astro-iconset.git","directory":"packages/astro-iconset"},"license":"MIT","bugs":{"url":"https://github.com/sudeep2003/astro-iconset/issues"},"homepage":"https://github.com/sudeep2003/astro-iconset#readme","peerDependencies":{"astro":">=3.5.0","react":">=18.0.0","react-dom":">=18.0.0","vue":">=3.0.0","svelte":">=4.0.0","preact":">=10.0.0","solid-js":">=1.0.0"},"peerDependenciesMeta":{"react":{"optional":true},"react-dom":{"optional":true},"vue":{"optional":true},"svelte":{"optional":true},"preact":{"optional":true},"solid-js":{"optional":true}},"dependencies":{"@iconify/tools":"^5.0.12","@iconify/types":"^2.0.0","@iconify/utils":"^3.1.3"},"devDependencies":{"@iconify-json/ri":"*","@types/node":"^22.0.0","@types/react":"^18.3.28","@types/react-dom":"^18.3.7","@vitest/coverage-v8":"^3.2.6","astro":"^6.4.5","typescript":"^5.0.4","vite":"^7.3.3","vitest":"^3.2.6"},"gitHead":"3eb0a34a91f3fe73501b21597931beba71fce9d8","_id":"astro-iconset@0.0.6","_nodeVersion":"24.14.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-Xl0pcPNn/0HFO8y52q9sWHTaBR3UFvx5cFAB35kZsWtIpYgFdcBr8IxuD/YmWGFcUJKErWpYgsfz9rjz1v0SMA==","shasum":"0595baf2128b59bb49a87083c11086c3a5fa6248","tarball":"https://registry.npmjs.org/astro-iconset/-/astro-iconset-0.0.6.tgz","fileCount":36,"unpackedSize":55700,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIEm6SDRNSdg8MvkorKxgjh3zZg7EKv3th5NXxqtHkaQUAiEAptArs2mEsYf1zZRGJSOKwQaN7nhJ7arzbFJMTTjJcWc="}]},"_npmUser":{"name":"sudeep2003","email":"sudipkr47@gmail.com"},"directories":{},"maintainers":[{"name":"sudeep2003","email":"sudipkr47@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/astro-iconset_0.0.6_1781681498165_0.7314527336297436"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-16T16:08:21.349Z","modified":"2026-06-17T07:31:38.422Z","0.0.1":"2026-03-16T16:08:21.589Z","0.0.2":"2026-04-11T08:16:36.910Z","0.0.3":"2026-04-11T15:52:37.688Z","0.0.4":"2026-04-19T20:06:36.793Z","0.0.5":"2026-05-13T20:22:45.890Z","0.0.6":"2026-06-17T07:31:38.288Z"},"bugs":{"url":"https://github.com/sudeep2003/astro-iconset/issues"},"author":{"name":"Sudeep","url":"https://github.com/sudeep2003"},"license":"MIT","homepage":"https://github.com/sudeep2003/astro-iconset#readme","keywords":["astro","withastro","astro-integration","astro-component","image","images","icon","icons","iconify","optimization"],"repository":{"type":"git","url":"git+https://github.com/sudeep2003/astro-iconset.git","directory":"packages/astro-iconset"},"description":"SVG icon integration for Astro — local icons, Iconify sets, sprite deduplication, and zero browser runtime.","maintainers":[{"name":"sudeep2003","email":"sudipkr47@gmail.com"}],"readme":"# Astro Iconset\r\n\r\n[![npm version](https://img.shields.io/npm/v/astro-iconset?color=blue)](https://www.npmjs.com/package/astro-iconset)\r\n[![npm downloads](https://img.shields.io/npm/dm/astro-iconset)](https://www.npmjs.com/package/astro-iconset)\r\n[![license](https://img.shields.io/npm/l/astro-iconset)](./LICENSE)\r\n\r\nAn [Astro integration](https://docs.astro.build/en/guides/integrations-guide/) that adds an `Icon` component for inlining SVGs at build time. Local files and [Iconify](https://iconify.design) sets are optimized with [SVGO](https://github.com/svg/svgo), repeated icons on a page share a sprite when not inlined, and nothing extra ships to the browser as a runtime.\r\n\r\n**Features**\r\n\r\n- Local icons from `src/icons/` (or your own paths), with optional named prefixes\r\n- Iconify collections via `@iconify-json/*` packages\r\n- Optional `*.svg?icon` imports for one-off files without a shared directory\r\n- Wrapper components for React, Vue, Svelte, Preact, and Solid (install only what you use)\r\n\r\n## Why astro-iconset?\r\n\r\n| Feature | astro-iconset | astro-icon and others |\r\n| --- | --- | --- |\r\n| Local icons from `src/icons/` | ✅ | ✅ |\r\n| Iconify collections | ✅ | ✅ |\r\n| SVG sprite deduplication | ✅ | ❌ |\r\n| Per-directory named prefixes | ✅ | ❌ |\r\n| `?icon` import for one-off SVGs | ✅ | ❌ |\r\n| React / Vue / Svelte / Preact / Solid | ✅ | ❌ |\r\n| Zero browser runtime | ✅ | ❌ |\r\n| SVGO optimization | ✅ | ✅ |\r\n\r\n- [Installation](#installation)\r\n- [Usage](#usage)\r\n  - [Local icons](#local-icons)\r\n  - [Iconify icons](#iconify-icons)\r\n  - [Imported SVGs (`?icon`)](#imported-svgs-icon)\r\n  - [Props](#props)\r\n  - [Styling](#styling)\r\n  - [Framework islands](#framework-islands)\r\n- [Configuration](#configuration)\r\n- [Contributing](#contributing)\r\n- [Changelog](#changelog)\r\n\r\n## Installation\r\n\r\n```sh\r\nnpm install astro-iconset\r\n```\r\n\r\n```sh\r\npnpm add astro-iconset\r\n```\r\n\r\n```sh\r\nyarn add astro-iconset\r\n```\r\n\r\nRegister the integration in **`astro.config.mjs`**:\r\n\r\n```js\r\nimport { defineConfig } from \"astro/config\";\r\nimport icon from \"astro-iconset\";\r\n\r\nexport default defineConfig({\r\n  integrations: [icon()],\r\n});\r\n```\r\n\r\n**Peer dependency:** `astro` (see `package.json` for the supported range). Framework packages (`react`, `vue`, etc.) are optional and only needed if you use the matching `astro-iconset/*` entry.\r\n\r\nIf something breaks, [open an issue](https://github.com/sudeep2003/astro-iconset/issues).\r\n\r\n## Usage\r\n\r\n### Local icons\r\n\r\n1. Add SVG files under `src/icons/` (or [configure](#icondir) another directory).\r\n2. Reference a file by its basename (no extension) with the `name` prop.\r\n\r\n```astro\r\n---\r\nimport { Icon } from \"astro-iconset/components\";\r\n---\r\n\r\n<Icon name=\"close\" />\r\n```\r\n\r\n### Iconify icons\r\n\r\n1. Pick a set on [Iconify Icon Sets](https://icon-sets.iconify.design/).\r\n2. Install the JSON package, for example: `npm i -D @iconify-json/mdi`\r\n3. Use `set:icon-name` in `name` (for example `mdi:account`).\r\n\r\n```astro\r\n---\r\nimport { Icon } from \"astro-iconset/components\";\r\n---\r\n\r\n<Icon name=\"mdi:account\" />\r\n```\r\n\r\nFor server or hybrid output, [limit which icons are bundled](#include) with `include` so the server bundle stays small.\r\n\r\n### Imported SVGs (`?icon`)\r\n\r\nYou can import a single file as Iconify-compatible data and pass it to `icon` instead of `name`:\r\n\r\n```astro\r\n---\r\nimport { Icon } from \"astro-iconset/components\";\r\nimport logo from \"../assets/logo.svg?icon\";\r\n---\r\n\r\n<Icon icon={logo} title=\"Logo\" />\r\n```\r\n\r\nUse either `name` or `icon`, not both.\r\n\r\nFor TypeScript, reference the package’s SVG module types (for example add `\"astro-iconset/svg-icon\"` to `compilerOptions.types`, or use a triple-slash reference in a `.d.ts` file).\r\n\r\n### Props\r\n\r\nThe `Icon` component accepts standard SVG/HTML attributes (including ARIA). Commonly used options:\r\n\r\n| Prop | Description |\r\n| --- | --- |\r\n| `name` | Local basename or `set:icon` for Iconify |\r\n| `icon` | Data from `import x from \"…svg?icon\"` |\r\n| `size` | Sets both `width` and `height` when provided |\r\n| `width` / `height` | Explicit dimensions |\r\n| `title` / `desc` | Accessible name and description |\r\n| `is:inline` | When `true`, inlines markup without the sprite path |\r\n\r\nSee [`Icon.astro`](./components/Icon.astro) for the full implementation.\r\n\r\n### Styling\r\n\r\nTarget icons with `[data-icon]`, or a specific file with `[data-icon=\"close\"]` (local) or the full `name` string for Iconify.\r\n\r\n```astro\r\n---\r\nimport { Icon } from \"astro-iconset/components\";\r\n---\r\n\r\n<style>\r\n  [data-icon] {\r\n    color: blue;\r\n  }\r\n  [data-icon=\"annotation\"] {\r\n    color: red;\r\n  }\r\n</style>\r\n\r\n<Icon name=\"adjustment\" />\r\n<Icon name=\"annotation\" />\r\n\r\n<Icon name=\"annotation\" class=\"text-red-500\" />\r\n```\r\n\r\n### Framework islands\r\n\r\nUse the matching subpath so icons work inside framework components:\r\n\r\n- `astro-iconset/react`\r\n- `astro-iconset/vue`\r\n- `astro-iconset/svelte`\r\n- `astro-iconset/preact`\r\n- `astro-iconset/solid`\r\n\r\nInstall the corresponding peer (`react`, `vue`, etc.) for the integration you use.\r\n\r\nYou can still compose with Astro’s [slots and children](https://docs.astro.build/en/guides/framework-components/#passing-children-to-framework-components) where the framework supports it.\r\n\r\n## Configuration\r\n\r\nOptions are passed to `icon({ ... })` in `astro.config.mjs`.\r\n\r\n### `include`\r\n\r\nFor `output: 'server'` or `output: 'hybrid'`, list the Iconify icons (or whole sets with `\"*\"`) that should be bundled. Unlisted icons are not included in the server bundle.\r\n\r\n```js\r\nimport { defineConfig } from \"astro/config\";\r\nimport icon from \"astro-iconset\";\r\n\r\nexport default defineConfig({\r\n  integrations: [\r\n    icon({\r\n      include: {\r\n        mdi: [\"account\", \"home\"],\r\n        // mdi: [\"*\"], // entire Material Design set (large)\r\n      },\r\n    }),\r\n  ],\r\n});\r\n```\r\n\r\n### `iconDir`\r\n\r\nDefault is `src/icons`. Set a string or an array of directories merged into the **`local`** set (unprefixed names). Duplicate names across folders fail the build.\r\n\r\n```js\r\nicon({\r\n  iconDir: \"src/assets/icons\",\r\n});\r\n```\r\n\r\n```js\r\nicon({\r\n  iconDir: [\"src/icons\", \"src/assets/icons\"],\r\n});\r\n```\r\n\r\n### `iconDirs`\r\n\r\nNamed directories become prefixes: `brand:logo`, `ui:menu`, etc.\r\n\r\n```js\r\nicon({\r\n  iconDirs: {\r\n    brand: \"src/brand-icons\",\r\n    ui: \"src/ui-icons\",\r\n  },\r\n});\r\n```\r\n\r\nTo use only `iconDirs` for the default local set, set `iconDirs.local` instead of `iconDir`. Do not set both `iconDir` and `iconDirs.local`.\r\n\r\n### `svgoOptions`\r\n\r\nOverride default SVGO behavior. See [SVGO configuration](https://github.com/svg/svgo#configuration).\r\n\r\n```js\r\nimport { defineConfig } from \"astro/config\";\r\nimport icon from \"astro-iconset\";\r\n\r\nexport default defineConfig({\r\n  integrations: [\r\n    icon({\r\n      svgoOptions: {\r\n        multipass: true,\r\n        plugins: [\r\n          {\r\n            name: \"preset-default\",\r\n            params: {\r\n              overrides: {\r\n                inlineStyles: {\r\n                  onlyMatchedOnce: false,\r\n                },\r\n                removeDoctype: false,\r\n              },\r\n            },\r\n          },\r\n        ],\r\n      },\r\n    }),\r\n  ],\r\n});\r\n```\r\n\r\n## Contributing\r\n\r\nIssues and pull requests are welcome at [github.com/sudeep2003/astro-iconset](https://github.com/sudeep2003/astro-iconset).\r\n\r\n## Changelog\r\n\r\nSee [CHANGELOG.md](CHANGELOG.md).\r\n","readmeFilename":"README.md"}