{"id":13807503,"url":"https://github.com/finnbear/yew_icons","last_synced_at":"2025-10-31T08:32:00.023Z","repository":{"id":41293492,"uuid":"479614034","full_name":"finnbear/yew_icons","owner":"finnbear","description":"Easily include a variety of SVGs into your Yew app","archived":false,"fork":false,"pushed_at":"2024-08-13T20:14:49.000Z","size":46600,"stargazers_count":42,"open_issues_count":3,"forks_count":7,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-09T14:13:26.520Z","etag":null,"topics":["crate","icon","iconpack","icons","rust","rust-crate","rust-lang","yew","yew-components","yew-framework"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/yew_icons","language":"Rust","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/finnbear.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-MIT","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":"2022-04-09T04:08:42.000Z","updated_at":"2025-01-22T22:54:04.000Z","dependencies_parsed_at":"2024-11-08T14:59:05.440Z","dependency_job_id":null,"html_url":"https://github.com/finnbear/yew_icons","commit_stats":{"total_commits":86,"total_committers":4,"mean_commits":21.5,"dds":0.5697674418604651,"last_synced_commit":"aee2878e326f2e13ccc950f665492717831980a2"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/finnbear%2Fyew_icons","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/finnbear%2Fyew_icons/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/finnbear%2Fyew_icons/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/finnbear%2Fyew_icons/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/finnbear","download_url":"https://codeload.github.com/finnbear/yew_icons/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239154800,"owners_count":19590769,"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":["crate","icon","iconpack","icons","rust","rust-crate","rust-lang","yew","yew-components","yew-framework"],"created_at":"2024-08-04T01:01:26.160Z","updated_at":"2025-10-31T08:31:52.450Z","avatar_url":"https://github.com/finnbear.png","language":"Rust","funding_links":[],"categories":["Crates"],"sub_categories":["Utils"],"readme":"# yew_icons\n\n[![Icons Gallery]][gallery] [![Latest Version]][crates.io]\n\n[icons gallery]: https://img.shields.io/badge/gallery-passing-brightgreen\n[gallery]: https://finnbear.github.io/yew_icons/\n[latest version]: https://img.shields.io/crates/v/yew_icons.svg\n[crates.io]: https://crates.io/crates/yew_icons\n\nThis crate makes it easy to use [SVG icons](https://finnbear.github.io/yew_icons/) from the following collections (more may be added in the future):\n\n| Icon Set             | License           | Variants                   |\n| -------------------- | ----------------- | -------------------------- |\n| **Bootstrap**        | MIT License       | -                          |\n| **Feather**          | MIT License       | Deprecated (use Lucide)    |\n| **Font Awesome**     | CC BY 4.0 License | Regular, Solid             |\n| **Heroicons**        | MIT License       | Solid, Outline, Mini Solid |\n| **Lipis Flag Icons** | MIT License       | -                          |\n| **Lucide**           | ISC License       | -                          |\n| **Octicons**         | MIT License       | -                          |\n| **Simple Icons**     | CC0 License       | -                          |\n| *Extra*              | Case-by-case      | -                          |\n\n## Gallery\n\n[![Gallery](assets/gallery_1.jpg)](https://finnbear.github.io/yew_icons/)\n\n\u003csmall\u003e\\*not all icons included in [gallery](https://finnbear.github.io/yew_icons/).\u003c/small\u003e\n\n## Usage\n\nUse the [gallery](https://finnbear.github.io/yew_icons/) to find icons you like, and add them as feature flags.\n\n```toml\n# If still using yew 0.19, use yew_icons 0.6.1\n# If still using yew 0.20, use yew_icons 0.7.3\n\n[dependencies]\nyew_icons = {version = \"0.8\", features = [\"LucideArrowLeftCircle\", \"LucideArrowRightCircle\", \"LucideArrowUpCircle\"]}\n```\n\nThen, add an `\u003cIcon\u003e` component with the corresponding icon id, optionally specifying a `width`, `height`, and/or `onclick` callback.\n\n```rust\nuse yew::prelude::*;\nuse yew_icons::{Icon, IconId};\n\nhtml!{\n    \u003c\u003e\n        \u003cIcon icon_id={IconId::LucideArrowLeftCircle}/\u003e\n        \u003cIcon icon_id={IconId::LucideArrowUpCircle} width={\"2em\".to_owned()} height={\"2em\".to_owned()}/\u003e\n        \u003cIcon icon_id={IconId::LucideArrowRightCircle} onclick={Callback::from(|_: MouseEvent| {})}/\u003e\n    \u003c/\u003e\n}\n```\n\n![example image](assets/example.png)\n\nNote: The icons will inherit their parent's CSS `color`.\n\n## Feature Flags\n\nEach icon collection must be included with the corresponding feature flag, such as `lucide` or `font_awesome_solid`.\n\nTo save binary size, individual icons can also be included by feature flag, such as `LucideZoomIn` or `FontAwesomeSolidAtom`.\n\nBy default, no collections or icons are included. Be warned that including too many icons may result in a `.wasm` binary\nthat some WebAssembly engines refuse to load, especially in debug mode (see \u003chttps://github.com/rustwasm/wasm-pack/issues/981\u003e).\n\n## License\n\nCode is licensed under either of\n\n- Apache License, Version 2.0\n  ([LICENSE-APACHE](LICENSE-APACHE) or \u003chttp://www.apache.org/licenses/LICENSE-2.0\u003e)\n- MIT license\n  ([LICENSE-MIT](LICENSE-MIT) or \u003chttp://opensource.org/licenses/MIT\u003e)\n\nat your option.\n\nIcons are licensed by their respective creators (see above). An license summary is emitted to the DOM for each icon:\n\n```html\n\u003csvg data-license=\"...original license...\"\u003e\u003c/svg\u003e\n```\n\n## Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in the work by you, as defined in the Apache-2.0 license, shall be\ndual licensed as above, without any additional terms or conditions.\n\n### Updating an Icon Collection\n\n```shell\n# 1. on first checkout, init submodules:\ngit submodule update --init --recursive\n\n# 2. update a submodule to latest commit in remote branch:\ngit submodule update --remote bootstrap\n\n# 3. generate the icons, writing the feature flags to a file:\ncargo run --features=\"generator\" \u003e generated_feature_flags.txt\n\n# 4. reformat the feature flags onto separate lines (choose your own adventure, e.g. vim macros)\n\n# 5. copy the feature flags from generated_feature_flags.txt to the Cargo.toml\n```\n\nPR's ideally shouldn't include non-trivial amounts of generated file diffs. Merging and then generating is much easier to review than thousands of generated files.\n\n### Running tests\n\n```shell\n# 1. uncomment the \"testing\" feature flag in Cargo.toml\n\n# 2. for each icon set to test, run:\ncargo test test --features \"enum-iterator testing [icon collection to test]\"\n# (the test name is \"test\", which we specify to skip the doc tests)\n# icon collection options are: bootstrap feather font_awesome_regular font_awesome_solid heroicons_mini_solid heroicons_outline heroicons_solid lipis_flag_icons_1_x_1 lipis_flag_icons_4_x_3 lucide octicons simple_icons\n# if testing all icon sets at once, the prokio-runtime-worker may overflow its stack\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffinnbear%2Fyew_icons","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffinnbear%2Fyew_icons","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffinnbear%2Fyew_icons/lists"}