{"id":48713278,"url":"https://github.com/woylie/ex_icon","last_synced_at":"2026-04-15T19:00:30.725Z","repository":{"id":350484300,"uuid":"1205930432","full_name":"woylie/ex_icon","owner":"woylie","description":"Generic icon library for Phoenix LiveView","archived":false,"fork":false,"pushed_at":"2026-04-10T18:56:04.000Z","size":60,"stargazers_count":3,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-14T18:24:28.433Z","etag":null,"topics":["icon-components","icons","phoenix-framework","phoenix-liveview"],"latest_commit_sha":null,"homepage":"https://hex.pm/packages/ex_icon","language":"Elixir","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/woylie.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"woylie","liberapay":"woylie","ko_fi":"woylie"}},"created_at":"2026-04-09T12:19:08.000Z","updated_at":"2026-04-11T08:33:07.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/woylie/ex_icon","commit_stats":null,"previous_names":["woylie/ex_icon"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/woylie/ex_icon","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/woylie%2Fex_icon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/woylie%2Fex_icon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/woylie%2Fex_icon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/woylie%2Fex_icon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/woylie","download_url":"https://codeload.github.com/woylie/ex_icon/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/woylie%2Fex_icon/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31855432,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"ssl_error","status_checked_at":"2026-04-15T15:24:39.138Z","response_time":63,"last_error":"SSL_read: 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":["icon-components","icons","phoenix-framework","phoenix-liveview"],"created_at":"2026-04-11T15:11:55.330Z","updated_at":"2026-04-15T19:00:30.595Z","avatar_url":"https://github.com/woylie.png","language":"Elixir","funding_links":["https://github.com/sponsors/woylie","https://liberapay.com/woylie","https://ko-fi.com/woylie"],"categories":[],"sub_categories":[],"readme":"# ExIcon\n\n[![CI](https://github.com/woylie/ex_icon/workflows/CI/badge.svg)](https://github.com/woylie/ex_icon/actions) [![Hex](https://img.shields.io/hexpm/v/ex_icon)](https://hex.pm/packages/ex_icon) [![Hex Docs](https://img.shields.io/badge/hex-docs-green)](https://hexdocs.pm/ex_icon/readme.html) [![Coverage Status](https://coveralls.io/repos/github/woylie/ex_icon/badge.svg)](https://coveralls.io/github/woylie/ex_icon)\n\nGeneric icon library for Phoenix LiveView.\n\n- Downloads icon sets and generates Phoenix LiveView function components.\n- Extensible via behaviour to support multiple icon libraries.\n- Icon library versions are set via configuration. Update your icons without\n  updating this library.\n- Generate components for all icons or only the ones you need.\n- Dev-only dependency. The library is only used for generating icon modules.\n\n## Installation\n\nAdd `ex_icon` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:ex_icon, \"~\u003e 0.3.0\", only: :dev}\n  ]\nend\n```\n\n## Usage\n\nExIcon expects a configuration file named `.ex_icon.exs`.\n\n```elixir\n[\n  lucide: [\n    # Either list only the icons you want to generate, or set to `:all` to\n    # generate all available icons.\n    icons: [\"arrow-left\", \"arrow-right\"],\n    # A module implementing the `ExIcon.Provider` behaviour.\n    provider: ExIcon.Lucide,\n    # The release version of the icon library.\n    version: \"1.8.0\",\n    # The destination path of the icon module that ExIcon will generate for you.\n    module_path: \"lib/my_app_web/components/lucide.ex\",\n    # The name of the generated module.\n    module_name: MyAppWeb.Components.Lucide,\n    # SVG attributes that should be turned into component attributes. Only\n    # attributes present in the original SVG files will be considered.\n    # Values must be lowercase strings.\n    # Example: [\"stroke\", \"stroke-width\"]\n    attrs: []\n  ]\n]\n```\n\n`lucide` is an arbitrary name that is currently only used for CLI output.\nYou can configure any number of icon providers.\n\nWith your configuration in place, you can download the configured release of\nthe icon library and generate a module with function components with:\n\n```bash\nmix ex_icon.gen_icons\n```\n\n## Attributes\n\nExIcon can optionally turn SVG attributes present in the original SVG files into\nfunction component attributes.\n\nFor example, consider this original SVG:\n\n```svg\n\u003csvg\n  xmlns=\"http://www.w3.org/2000/svg\"\n  width=\"24\"\n  height=\"24\"\n  viewBox=\"0 0 24 24\"\n  stroke=\"currentColor\"\n  stroke-width=\"2\"\n\u003e\n  \u003cpath d=\"m12 19-7-7 7-7\" /\u003e\n  \u003cpath d=\"M19 12H5\" /\u003e\n\u003c/svg\u003e\n```\n\nIf you set the `attrs` option to `[\"stroke\"]`, the generated function component\nwill look like this:\n\n```elixir\nattr :stroke, :string, default: \"currentColor\"\n\ndef arrow_left(assigns) do\n  ~H\"\"\"\n  \u003csvg\n    xmlns=\"http://www.w3.org/2000/svg\"\n    width=\"24\"\n    height=\"24\"\n    viewBox=\"0 0 24 24\"\n    stroke={@stroke}\n    stroke-width=\"2\"\n    aria-hidden=\"true\"\n  \u003e\n    \u003cpath d=\"m12 19-7-7 7-7\" /\u003e\n    \u003cpath d=\"M19 12H5\" /\u003e\n  \u003c/svg\u003e\n  \"\"\"\nend\n```\n\nNote that if you generate a lot of icons, compilation times can increase\nsubstantially by adding attributes.\n\n## Providers\n\nProviders for specific icon libraries are based on the `ExIcon.Provider`\nbehaviour. The library currently supports these providers:\n\n- [Lucide](https://lucide.dev/)\n- [Simple Icons](https://simpleicons.org/)\n\n## Contributing\n\nPlease open an issue or PR if you need additional options, features, or support\nfor other icon libraries. Be sure to read the [contributing guidelines](https://github.com/woylie/ex_icon?tab=contributing-ov-file).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwoylie%2Fex_icon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwoylie%2Fex_icon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwoylie%2Fex_icon/lists"}