{"id":13723406,"url":"https://github.com/alphapeter/fa-svelte","last_synced_at":"2025-04-12T14:12:13.217Z","repository":{"id":33282830,"uuid":"143169767","full_name":"alphapeter/fa-svelte","owner":"alphapeter","description":"Font Awesome 5 for svelte.js","archived":false,"fork":false,"pushed_at":"2023-01-05T00:43:21.000Z","size":2660,"stargazers_count":71,"open_issues_count":35,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-26T08:47:43.549Z","etag":null,"topics":["font-awesome","fontawesome","fontawesome5","javascript","svelte","svelte-components","sveltejs"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/alphapeter.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}},"created_at":"2018-08-01T14:48:29.000Z","updated_at":"2024-05-30T20:17:56.000Z","dependencies_parsed_at":"2023-01-15T00:22:10.042Z","dependency_job_id":null,"html_url":"https://github.com/alphapeter/fa-svelte","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alphapeter%2Ffa-svelte","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alphapeter%2Ffa-svelte/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alphapeter%2Ffa-svelte/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alphapeter%2Ffa-svelte/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alphapeter","download_url":"https://codeload.github.com/alphapeter/fa-svelte/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248578871,"owners_count":21127713,"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":["font-awesome","fontawesome","fontawesome5","javascript","svelte","svelte-components","sveltejs"],"created_at":"2024-08-03T01:01:40.878Z","updated_at":"2025-04-12T14:12:13.199Z","avatar_url":"https://github.com/alphapeter.png","language":"JavaScript","funding_links":[],"categories":["components and libraries"],"sub_categories":["fonts and icons"],"readme":"# fa-svelte\n[Fontawesome 5](https://fontawesome.com/) for [svelte v3.x](https://svelte.dev/) \n\n(For svelte v2, use fa-svelte v1.x.x)\n## About\nA simple minimalistic lightweight svelte component for Font Awesome SVG icons.\n* Small footprint \n* Only used icons will be bundled\n* No dependencies\n* Only SVG (no fonts)\n* Does not require additional CSS files \n\nThis library is currently not intended to be fully featured, it is the option when size and speed is of importance.\n\n\n## Installation \nInstall as a development dependency\n\n`npm install -D fa-svelte`\n\n## Usage\n\n### Basic usage\n\nUsing font awesome solid Icons, first install them using npm  \n\n`npm install @fortawesome/free-solid-svg-icons`\n\n```html\n\u003cIcon icon={icon}\u003e\n\u003c/Icon\u003e\n\n\u003cscript\u003e\nimport Icon from 'fa-svelte'\nimport { faCircle } from '@fortawesome/free-solid-svg-icons/faCircle'\n\nlet icon = faCircle;\n\u003c/script\u003e\n```\n\n### Classes\n```html\n\u003cdiv\u003e\n  \u003cIcon class=\"myClass1 myClass2\" icon={faCircle}\u003e\n  \u003c/Icon\u003e\n\u003c/div\u003e\n\n\u003cscript\u003e\nimport Icon from 'fa-svelte'\nimport { faCircle } from '@fortawesome/free-solid-svg-icons/faCircle'\n\nlet icon = faCircle;\n\u003c/script\u003e\n\u003cstyle\u003e\n\ndiv :global(.myClass1) {\n    color: red;\n}\n\ndiv :global(.myClass2) {\n    font-size: 14px;\n}\n\u003c/style\u003e\n```\n\n## Configuring webpack\n\nIf you're using webpack with [svelte-loader](https://github.com/sveltejs/svelte-loader), \nmake sure that you add `\"svelte\"` to \n[`resolve.mainFields`](https://webpack.js.org/configuration/resolve/#resolve-mainfields) in \nyour webpack config. This ensures that webpack imports the uncompiled component (`src/Icon.svelte`) \nrather than the compiled version (`index.js`) — this is more efficient and will also resolve component \ncrash in runtime.  \n\nFor a working web pack example, look at [examples/webpack](https://github.com/alphapeter/fa-svelte/tree/master/examples/webpack)  \n\n## Credits\n\nThis component is based on the [template](https://github.com/sveltejs/component-template) \nprovided by [sveltejs](https://github.com/sveltejs) \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falphapeter%2Ffa-svelte","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falphapeter%2Ffa-svelte","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falphapeter%2Ffa-svelte/lists"}