{"id":16229785,"url":"https://github.com/indaco/svelte-iconoir","last_synced_at":"2025-03-16T12:32:09.171Z","repository":{"id":41193877,"uuid":"413577506","full_name":"indaco/svelte-iconoir","owner":"indaco","description":"Iconoir SVG icons to Svelte and SvelteKit.","archived":false,"fork":false,"pushed_at":"2024-09-09T09:07:34.000Z","size":670,"stargazers_count":10,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-10-11T12:58:56.391Z","etag":null,"topics":["iconoir","icons","icons-set","svelte","sveltekit","svg-icons"],"latest_commit_sha":null,"homepage":"https://www.sveltelab.dev/ron1rnx11t6ai0h","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/indaco.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2021-10-04T20:43:37.000Z","updated_at":"2024-09-27T18:22:51.000Z","dependencies_parsed_at":"2024-01-10T08:37:45.716Z","dependency_job_id":"4bb77f14-fd57-48b5-93b2-a0f82d377377","html_url":"https://github.com/indaco/svelte-iconoir","commit_stats":{"total_commits":164,"total_committers":3,"mean_commits":"54.666666666666664","dds":"0.060975609756097615","last_synced_commit":"60cd5755e6c86888ce08585c83abe2c471c48c20"},"previous_names":[],"tags_count":54,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indaco%2Fsvelte-iconoir","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indaco%2Fsvelte-iconoir/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indaco%2Fsvelte-iconoir/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indaco%2Fsvelte-iconoir/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/indaco","download_url":"https://codeload.github.com/indaco/svelte-iconoir/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221663621,"owners_count":16859867,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["iconoir","icons","icons-set","svelte","sveltekit","svg-icons"],"created_at":"2024-10-10T12:59:14.912Z","updated_at":"2024-10-27T10:33:46.639Z","avatar_url":"https://github.com/indaco.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n    \u003ch1\u003eSvelte Iconoir\u003c/h1\u003e\n    \u003ca href=\"https://github.com/indaco/svelte-iconoir/actions/workflows/release.yml\" target=\"_blank\"\u003e\n        \u003cimg src=\"https://github.com/indaco/svelte-iconoir/actions/workflows/release.yml/badge.svg\" alt=\"CI\" /\u003e\n    \u003c/a\u003e\n    \u0026nbsp;\n    \u003ca href=\"https://github.com/indaco/svelte-iconoir/blob/main/LICENSE\" target=\"_blank\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/license-mit-blue?style=flat-square\u0026logo=none\" alt=\"license\" /\u003e\n    \u003c/a\u003e\n    \u0026nbsp;\n    \u003ca href=\"https://www.npmjs.com/package/@indaco/svelte-iconoir\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/@indaco/svelte-iconoir.svg?style=flat\" alt=\"NPM Package\" /\u003e\u003c/a\u003e\n\u003c/div\u003e\n\nThe entire [iconoir](https://github.com/lucaburgio/iconoir) set (1500+ SVG icons) as Svelte components.\n\nSee all available icons on the **iconoir** [homepage](https://iconoir.com/).\n\n## Install\n\n```bash\n# npm\nnpm install @indaco/svelte-iconoir\n\n# pnpm\npnpm add @indaco/svelte-iconoir\n\n# yarn\nyarn add @indaco/svelte-iconoir\n```\n\n## Usage\n\n```html\n\u003cscript\u003e\n\timport { \u003cComponentName\u003eIcon } from '@indaco/svelte-iconoir/\u003cicon_variant\u003e/\u003cicon_name\u003e';\n\u003c/script\u003e\n```\n\nwhere:\n\n- `\u003cComponentName\u003e`: named as _PascalCase_ variations of the icon name\n- `\u003cicon_variant\u003e`:\n  - `regular` variant is the **default one and does not need to be specified**\n  - `solid` (check on [iconoir.com](https://iconoir.com) if available)\n- `\u003cicon_name\u003e`: the original icon name as per iconoir.com\n\n### Example\n\n```html\n\u003cscript\u003e\n\timport { SunLightIcon } from '@indaco/svelte-iconoir/sun-light';\n\t// or...\n\timport SunLightIcon from '@indaco/svelte-iconoir/components/SunLightIcon.svelte';\n\n\t// variant `solid`\n\timport { MinusCircleIcon } from '@indaco/svelte-iconoir/solid/minus-circle';\n\t// or component import\n\timport MinusCircleIcon from '@indaco/svelte-iconoir/components/solid/MinusCircleIcon.svelte';\n\u003c/script\u003e\n```\n\n### Exceptions\n\nThe naming convention above has few exceptions breaking it:\n\n1. icons for companies (github, youtube etc.):\n   - to reflect the real company names (GitHub, YouTube, etc.).\n\n| Icon Name     | Component Name   |\n| :------------ | :--------------- |\n| github        | GitHubIcon       |\n| github-circle | GitHubCircleIcon |\n| gitlab-full   | GitLabFullIcon   |\n| linkedin      | LinkedInIcon     |\n| tiktok        | TikTokIcon       |\n| youtube       | YouTubeIcon      |\n\n## Styling Icons\n\nYou can apply your own styles to the icon components in different ways:\n\n### 1. Direct\n\n```html\n\u003cscript\u003e\n\timport { SunLightIcon } from '@indaco/svelte-iconoir/sun-light';\n\u003c/script\u003e\n\n\u003cSunLightIcon class=\"roundedColor\" /\u003e\n\n\u003cstyle\u003e\n\t.roundedColor {\n\t\tpadding: 4px;\n\t\tbackground-color: yellow;\n\t\tborder-style: solid;\n\t\tborder-color: #d1d5db;\n\t}\n\u003c/style\u003e\n```\n\n### 2. Inline styles\n\n```html\n\u003cscript\u003e\n\timport { SunLightIcon } from '@indaco/svelte-iconoir/sun-light';\n\u003c/script\u003e\n\n\u003cSunLightIcon\n\tstyle=\"background-color: green; padding: 4px; border-radius: 9999px;\"\n\tcolor=\"#ffffff\"\n/\u003e\n```\n\n### 3. With Tailwind CSS\n\n```html\n\u003cscript\u003e\n\timport { SunLightIcon } from '@indaco/svelte-iconoir/sun-light';\n\u003c/script\u003e\n\n\u003cSunLightIcon class=\"p-1 rounded-full border-2 bg-green-400\" size=\"xl\" /\u003e\n```\n\n## Properties\n\nEach icon component can take any attribute of a normal SVG Element, for example:\n\n```html\n\u003cZoomOutIcon fill=\"red\" stroke-width=\"3\" /\u003e\n```\n\nIn addition to these, each component can take the following properties:\n\n| Property | Type       | Default   | Description                                    |\n| :------- | :--------- | :-------- | :--------------------------------------------- |\n| size     | `IconSize` | `base`    | Set the attributes `width` and `height`        |\n| altText  | `string`   | icon name | Set the `aria-labelledby` attribute on the svg |\n\nThe underlying properties can also be set and overriden manually, e.g. setting `width` explicitly takes precedence over `size`.\n\n```javascript\n/**\n * The size of the icon.\n * @typedef {(‘xs’|’sm’|’base’|’lg’|’xl’|number|string)} IconSize\n */\n```\n\n| Size |    Value |\n| :--- | -------: |\n| xs   |    `1em` |\n| sm   | `1.25em` |\n| base |  `1.5em` |\n| lg   | `1.75em` |\n| xl   |    `2em` |\n\n## Event Forwarding\n\nThe following events are _forwarded_.\n\n| Name            |\n| :-------------- |\n| `on:click`      |\n| `on:dblclick`   |\n| `on:keyup`      |\n| `on:keydown`    |\n| `on:mouseenter` |\n| `on:mouseleave` |\n\nFor example, you can set the `on:click` event on all icons.\n\n```html\n\u003cscript\u003e\n\timport { SunLightIcon } from '@indaco/svelte-iconoir/sun-light';\n\u003c/script\u003e\n\n\u003cSunLightIcon on:click=\"{()\" =\"\"\u003e alert(\"hi!\")} /\u003e\u003c/SunLightIcon\u003e\n```\n\n## Dev Flow\n\n```bash\ngit clone https://github.com/indaco/svelte-iconoir.git\n\ncd svelte-iconoir\n\n# Install all dependencies\npnpm install # (or npm, yarn)\n\n# Update Iconoir submodule\ngit submodule update --remote\n\n# Generate Svelte components for each icon\npnpm generate:icons\n\n# Package\npnpm build\n\n## Run postbuild script\npnpm postbuild\n```\n\n## License\n\nFree and open-source software under the [MIT License](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Findaco%2Fsvelte-iconoir","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Findaco%2Fsvelte-iconoir","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Findaco%2Fsvelte-iconoir/lists"}