{"id":15685300,"url":"https://github.com/maful/ruby-phosphor-icons","last_synced_at":"2025-10-08T17:18:17.446Z","repository":{"id":176363727,"uuid":"656943034","full_name":"maful/ruby-phosphor-icons","owner":"maful","description":"Phosphor Icons for Ruby and Rails","archived":false,"fork":false,"pushed_at":"2024-07-24T00:39:30.000Z","size":54,"stargazers_count":25,"open_issues_count":1,"forks_count":5,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-03T14:53:26.956Z","etag":null,"topics":["gem","hacktoberfest","icon","phosphor-icons","rails","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/maful.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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},"funding":{"github":"maful"}},"created_at":"2023-06-22T01:19:31.000Z","updated_at":"2025-09-29T23:40:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"a188b191-222d-4201-bd88-12aede4b1ce0","html_url":"https://github.com/maful/ruby-phosphor-icons","commit_stats":{"total_commits":20,"total_committers":2,"mean_commits":10.0,"dds":"0.050000000000000044","last_synced_commit":"bb9da0cd2dda89c360f6ea4e088f8c8e19430e38"},"previous_names":["maful/ruby-phosphor-icons"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/maful/ruby-phosphor-icons","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maful%2Fruby-phosphor-icons","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maful%2Fruby-phosphor-icons/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maful%2Fruby-phosphor-icons/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maful%2Fruby-phosphor-icons/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maful","download_url":"https://codeload.github.com/maful/ruby-phosphor-icons/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maful%2Fruby-phosphor-icons/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278877088,"owners_count":26061380,"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","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["gem","hacktoberfest","icon","phosphor-icons","rails","ruby"],"created_at":"2024-10-03T17:24:38.345Z","updated_at":"2025-10-08T17:18:17.416Z","avatar_url":"https://github.com/maful.png","language":"Ruby","funding_links":["https://github.com/sponsors/maful"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./social-phosphor-icons.png\" width=\"1280\" title=\"Social Card Ruby Phosphor Icons\"\u003e\n\u003c/p\u003e\n\n# Ruby Phosphor Icons\n\n\u003ca href=\"https://github.com/maful/ruby-phosphor-icons/actions?query=workflow%3ACI\"\u003e\n  \u003cimg src=\"https://github.com/maful/ruby-phosphor-icons/actions/workflows/ci.yml/badge.svg\" alt=\"Tests\"\u003e\n\u003c/a\u003e\n\u003ca href=\"https://rubygems.org/gems/phosphor_icons\"\u003e\n  \u003cimg src=\"https://img.shields.io/gem/v/phosphor_icons\" alt=\"Latest Stable Version\"\u003e\n\u003c/a\u003e\n\nA gem to easily include [Phosphor Icons](https://phosphoricons.com) in your Ruby and Rails apps.\n\nFor a full list of available icons see [the assets directory](https://github.com/phosphor-icons/core/tree/c67d7a849f450be1bfe64fd5820471e4019e5ff0/assets) or preview them at [phosphoricons.com](https://phosphoricons.com/).\n\n## Requirements\n\n- Ruby 2.7 or higher\n\n## Installation\n\nInstall the gem and add to the application's Gemfile by executing:\n\n```sh\nbundle add phosphor_icons\n```\n\nor add this in your Gemfile\n\n```rb\ngem \"phosphor_icons\"\n```\n\n## Usage\n\n```ruby\nrequire \"phosphor_icons\"\n\nicon = PhosphorIcons::Icon.new(\"alarm\")\nicon.to_svg\n# \u003csvg class=\"phosphor-icon\" viewBox=\"0 0 256 256\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"currentColor\" width=\"24\" height=\"24\"\u003e\u003cpath d=\"M128,32a96,96,0,1,0,96,96A96.11,96.11,0,0,0,128,32Zm0,176a80,80,0,1,1,80-80A80.09,80.09,0,0,1,128,208ZM61.66,29.66l-32,32A8,8,0,0,1,18.34,50.34l32-32A8,8,0,1,1,61.66,29.66Zm176,32a8,8,0,0,1-11.32,0l-32-32a8,8,0,0,1,11.32-11.32l32,32A8,8,0,0,1,237.66,61.66ZM184,120a8,8,0,0,1,0,16H128a8,8,0,0,1-8-8V72a8,8,0,0,1,16,0v48Z\"/\u003e\u003c/svg\u003e\n```\n\nIf you are using Ruby on Rails, you can use `phosphor_icon` helper in your views directly\n\n```erb\n\u003c%= phosphor_icon \"alarm\", class: \"h-5 w-5\" %\u003e\n\u003c%= phosphor_icon \"x\", height: 48 %\u003e\n```\n\n## Documentation\n\nThe `Icon` class takes two arguments. The first is the symbol of the icon, and the second is a hash of arguments representing html attributes.\n\n### `symbol` _(required)_\n\nThis is the name of the Phosphor Icon you want to use. For example `alarm`. [Full list of icons](https://phosphoricons.com)\n\n### Options\n\n* `:style` - Apply a specific style to the icon. Available options are `regular` (default), `bold`, `light`, `duotone`, `fill` and `thin`.\n* `:height` - When setting the height to a number, the icon will scale to that size. For example, passing `24`, will calculate the width based on the icon's natural size.\n* `:width` - When setting the width to a number, the icon will scale to that size. For example, passing `24`, will calculate the width based on the icon's natural size.\n\n### Attributes\n\nOnce initialized, you can read a few properties from the icon.\n\n#### `symbol`\n\nReturns the string of the symbol name\n\n```rb\nicon = PhosphorIcons::Icon.new(\"alarm\")\nicon.symbol\n# \"alarm\"\n```\n\n#### `style`\n\nReturns the style of the icon\n\n```rb\nicon = PhosphorIcons::Icon.new(\"alarm\", style: :bold)\nicon.style\n# \"bold\"\n```\n\n#### `path`\n\nPath returns the string representation of the path of the icon.\n\n```rb\nicon = PhosphorIcons::Icon.new(\"alarm\")\nicon.path\n# \u003cpath d=\"M128,32a96,96,0,1,0,96,96A96.11,96.11,0,0,0,128,32Zm0,176a80,80,0,1,1,80-80A80.09,80.09,0,0,1,128,208ZM61.66,29.66l-32,32A8,8,0,0,1,18.34,50.34l32-32A8,8,0,1,1,61.66,29.66Zm176,32a8,8,0,0,1-11.32,0l-32-32a8,8,0,0,1,11.32-11.32l32,32A8,8,0,0,1,237.66,61.66ZM184,120a8,8,0,0,1,0,16H128a8,8,0,0,1-8-8V72a8,8,0,0,1,16,0v48Z\"/\u003e\n```\n\n#### `options`\n\nThis is a hash of all the `options` that will be added to the output tag.\n\n```rb\nicon = PhosphorIcons::Icon.new(\"alarm\")\nicon.options\n# {:class=\u003e\"phosphor-icon\", :viewBox=\u003e\"0 0 256 256\", :xmlns=\u003e\"http://www.w3.org/2000/svg\", :fill=\u003e\"currentColor\", :width=\u003e24, :height=\u003e24}\n```\n\n#### `width`\n\nWidth is the icon's true width.\n\n```rb\nicon = PhosphorIcons::Icon.new(\"alarm\", width: 24)\nicon.height\n# 24\n```\n\n#### `height`\n\nHeight is the icon's true height.\n\n```rb\nicon = PhosphorIcons::Icon.new(\"alarm\", height: 24)\nicon.height\n# 24\n```\n\n### Methods\n\n#### `to_svg`\n\nReturns a string of the svg tag\n\n```rb\nicon = PhosphorIcons::Icon.new(\"alarm\")\nicon.to_svg\n# \u003csvg class=\"phosphor-icon\" viewBox=\"0 0 256 256\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"currentColor\" width=\"24\" height=\"24\"\u003e\u003cpath d=\"M128,32a96,96,0,1,0,96,96A96.11,96.11,0,0,0,128,32Zm0,176a80,80,0,1,1,80-80A80.09,80.09,0,0,1,128,208ZM61.66,29.66l-32,32A8,8,0,0,1,18.34,50.34l32-32A8,8,0,1,1,61.66,29.66Zm176,32a8,8,0,0,1-11.32,0l-32-32a8,8,0,0,1,11.32-11.32l32,32A8,8,0,0,1,237.66,61.66ZM184,120a8,8,0,0,1,0,16H128a8,8,0,0,1-8-8V72a8,8,0,0,1,16,0v48Z\"/\u003e\u003c/svg\u003e\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/maful/ruby-phosphor-icons. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/maful/ruby-phosphor-icons/blob/main/CODE_OF_CONDUCT.md).\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n## Code of Conduct\n\nEveryone interacting in the PhosphorIcons project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/maful/ruby-phosphor-icons/blob/main/CODE_OF_CONDUCT.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaful%2Fruby-phosphor-icons","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaful%2Fruby-phosphor-icons","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaful%2Fruby-phosphor-icons/lists"}