{"id":28855921,"url":"https://github.com/xandertreat/solid-iconify","last_synced_at":"2026-05-07T06:33:10.748Z","repository":{"id":298031860,"uuid":"996569009","full_name":"xandertreat/solid-iconify","owner":"xandertreat","description":"A light-weight and performant native Solid.js first class Iconify component with configuration and type-safety","archived":false,"fork":false,"pushed_at":"2025-06-09T18:01:41.000Z","size":133,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-03T18:57:54.913Z","etag":null,"topics":["component","esm","icon","iconify","js","jsx","npm","solidjs","svg","ts","tsx","vector"],"latest_commit_sha":null,"homepage":"https://github.com/xandertreat/solid-iconify","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xandertreat.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-05T06:19:36.000Z","updated_at":"2025-08-29T07:55:57.000Z","dependencies_parsed_at":"2025-06-09T03:36:37.727Z","dependency_job_id":null,"html_url":"https://github.com/xandertreat/solid-iconify","commit_stats":null,"previous_names":["xandertreat/solid-iconify"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/xandertreat/solid-iconify","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xandertreat%2Fsolid-iconify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xandertreat%2Fsolid-iconify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xandertreat%2Fsolid-iconify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xandertreat%2Fsolid-iconify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xandertreat","download_url":"https://codeload.github.com/xandertreat/solid-iconify/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xandertreat%2Fsolid-iconify/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32725997,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-07T02:14:30.463Z","status":"ssl_error","status_checked_at":"2026-05-07T02:14:29.405Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["component","esm","icon","iconify","js","jsx","npm","solidjs","svg","ts","tsx","vector"],"created_at":"2025-06-20T00:09:26.451Z","updated_at":"2026-05-07T06:33:10.743Z","avatar_url":"https://github.com/xandertreat.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @xtreat/solid-iconify\n\n[![npm version](https://img.shields.io/npm/v/@xtreat/solid-iconify?color=blue\u0026logo=npm)](https://www.npmjs.com/package/@xtreat/solid-iconify)\n[![npm downloads](https://img.shields.io/npm/dm/@xtreat/solid-iconify?color=blueviolet)](https://www.npmjs.com/package/@xtreat/solid-iconify)\n[![Bundle Size](https://img.shields.io/bundlephobia/minzip/@xtreat/solid-iconify?label=bundlephobia)](https://bundlephobia.com/package/@xtreat/solid-iconify)\n[![Types](https://img.shields.io/npm/types/@xtreat/solid-iconify?label=types)](https://www.npmjs.com/package/@xtreat/solid-iconify)\n\n[![CI Checks](https://img.shields.io/github/actions/workflow/status/xandertreat/textual-theme-gen/ci.yml?branch=main)](https://github.com/xandertreat/textual-theme-gen/actions)\n[![Maintained](https://img.shields.io/badge/maintained-yes-brightgreen)](https://img.shields.io/badge/maintained-yes-brightgreen)\n[![Open Issues](https://img.shields.io/github/issues/xandertreat/textual-theme-gen)](https://github.com/xandertreat/textual-theme-gen/issues)\n[![Open PRs](https://img.shields.io/github/issues-pr/xandertreat/textual-theme-gen?color=purple)](https://github.com/xandertreat/textual-theme-gen/pulls)\n\n[![MIT License](https://img.shields.io/badge/license-MIT-success?logo=open-source-initiative\u0026logoColor=white)](https://github.com/xandertreat/textual-theme-gen/blob/main/LICENSE)\n[![Code Style: Biome](https://img.shields.io/badge/code%20style-biome-5ed9c7?logo=biome\u0026logoColor=white)](https://biomejs.dev/)\n[![SolidJS](https://img.shields.io/badge/SolidJS-1.9.0+-blue?logo=solid)](https://www.solidjs.com/)\n\n[![Forks](https://img.shields.io/github/forks/xandertreat/textual-theme-gen?style=social)](https://github.com/xandertreat/textual-theme-gen/fork)\n[![GitHub stars](https://img.shields.io/github/stars/xandertreat/textual-theme-gen?style=social)](https://github.com/xandertreat/textual-theme-gen)\n[![Visitors](https://visitor-badge.laobi.icu/badge?page_id=xandertreat.textual-theme-gen)](https://visitor-badge.laobi.icu/badge?page_id=xandertreat.textual-theme-gen)\n\nA blazing-fast, fully reactive, and type-safe [SolidJS](https://www.solidjs.com/) component for rendering [Iconify](https://iconify.design/) icons. Designed for both SSR and client-side rendering, with first-class TypeScript support, flexible configuration, and zero runtime dependencies (besides SolidJS).\n\n---\n\n## ✨ Features\n\n- **Reactive**: Icons update automatically when props change.\n- **Type-Safe**: Full TypeScript support, including strict icon specifier validation.\n- **SSR-Ready**: Works seamlessly with SolidJS server-side rendering.\n- **Configurable**: Customize API endpoints, caching, SVG defaults, and more.\n- **Flexible**: Supports all Iconify icon sets and custom collections.\n- **Lightweight**: Minimal runtime, no unnecessary dependencies.\n- **Secure**: Optional sanitization with [xss](https://www.npmjs.com/package/xss).\n- **Modern**: ESM-only, ships with `.jsx` and TypeScript types\n\n---\n\n## 🚀 Quick Start\n\n### 1. Install\n\n```sh\nnpm install @xtreat/solid-iconify\n# or\nyarn add @xtreat/solid-iconify\n# or\nbun add @xtreat/solid-iconify\n```\n\n### 2. Usage\n\n```tsx\nimport Icon from \"@xtreat/solid-iconify\";\n\nfunction App() {\n  return (\n    \u003c\u003e\n      \u003cIcon icon=\"mdi:account\" width={32} height={32} /\u003e\n      \u003cIcon icon=\"fa:user\" color=\"tomato\" /\u003e\n    \u003c/\u003e\n  );\n}\n\nexport default App;\n```\n\n#### With Custom Configuration\n\n```tsx\nimport { configureIconify } from \"@xtreat/solid-iconify\";\n\nconfigureIconify({\n  ICONIFY_API: [\"api.iconify.design\", \"yourapihere.com\"],\n  SANITIZE: true,\n});\n```\n\n---\n\n## 🧩 API\n\n### `\u003cIcon /\u003e` Props\n\n| Prop         | Type                    | Description                       |\n|--------------|-------------------------|-----------------------------------|\n| `icon`       | `string` (e.g. `mdi:account`) | **Required.** Iconify icon specifier |\n| ...SVG props |                         | Any valid SVG attribute           |\n\n### `configureIconify(config)`\n\nConfigure global defaults for all icons. Accepts a partial config object:\n\n```ts\nconfigureIconify({\n  ICONIFY_API: string | URL | Array\u003cstring | URL\u003e,\n  REQUEST_OPTIONS: RequestInit,\n  CACHE_SIZE: number | { strategy: \"grow\" | \"static\" | \"unlimited\" },\n  COLLECTION_SIZE: number | { strategy: \"grow\" | \"static\" | \"unlimited\" },\n  DEFAULT_SVG_ATTRIBUTES: Partial\u003cJSX.SvgSVGAttributes\u003cSVGSVGElement\u003e\u003e,\n  SANITIZE: boolean,\n  SANITIZE_OPTIONS: Partial\u003cIFilterXSSOptions\u003e,\n});\n```\n\n---\n\n## 🏗️ How It Works\n\n- **Reactive Fetching:** Uses Solid's `createResource` to fetch and cache SVGs from the Iconify API.\n- **Caching:** LRU cache for icons and collections, configurable for memory efficiency.\n- **Sanitization:** Optionally sanitizes SVGs for XSS protection.\n- **SSR Support:** Works in both server and client environments.\n\n---\n\n## 🧪 Testing\n\nThis package uses [Vitest](https://vitest.dev/) for unit and e2e tests. To run tests:\n\n```sh\nnpm test\n```\n\n---\n\n## 📦 Build \u0026 Publish\n\n- Build: `npm run build`\n- Lint: `npm run lint`\n- Format: `npm run format`\n- Type-check: `npm run check`\n\n---\n\n## 🛡️ TypeScript Types\n\nAll types are exported:\n\n```ts\nimport type {\n  IconifyIconProps,\n  IconifyConfig,\n  // ...etc\n} from \"@xtreat/solid-iconify\";\n```\n\n---\n\n## 📚 Example\n\n```tsx\nimport Icon from \"@xtreat/solid-iconify\";\n\n\u003cIcon icon=\"mdi:home\" width={48} color=\"#0078d4\" /\u003e\n```\n\n---\n\n## 💬 Feedback \u0026 Contributions\n\nIssues and PRs are welcome! [Open an issue](https://github.com/xandertreat/solid-iconify/issues) or [submit a pull request](https://github.com/xandertreat/solid-iconify/pulls).\n\n---\n\n## 🔗 Links\n\n- [Iconify Icon Explorer](https://icon-sets.iconify.design/)\n- [SolidJS Docs](https://www.solidjs.com/docs)\n- [Project Repository](https://github.com/xandertreat/solid-iconify)\n\n---\n\n## 🐞 Known Bugs\n\n- **Icon reactivity broken**: Changing the `icon` prop does not always update the rendered SVG as expected.\n\n---\n\n## 📝 License\n\nMIT © 2025 Xander Treat\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxandertreat%2Fsolid-iconify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxandertreat%2Fsolid-iconify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxandertreat%2Fsolid-iconify/lists"}