{"id":14775078,"url":"https://github.com/AliOsm/phlex-icons","last_synced_at":"2025-09-14T19:32:41.998Z","repository":{"id":255436135,"uuid":"849548876","full_name":"AliOsm/phlex-icons","owner":"AliOsm","description":"General icons extension for Phlex. Includes more than 🎨 12,000 icons.","archived":false,"fork":false,"pushed_at":"2024-12-30T10:59:48.000Z","size":12896,"stargazers_count":34,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-02T07:58:43.872Z","etag":null,"topics":["bootstrap-icons","flag-icons","heroicons","lucide-icons","phlex","radix-ui-icons","remixicons","ruby-on-rails","svg","tabler-icons"],"latest_commit_sha":null,"homepage":"https://phlex-icons.fun","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/AliOsm.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","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}},"created_at":"2024-08-29T19:40:59.000Z","updated_at":"2024-12-31T07:15:17.000Z","dependencies_parsed_at":"2025-01-01T07:15:37.793Z","dependency_job_id":null,"html_url":"https://github.com/AliOsm/phlex-icons","commit_stats":{"total_commits":132,"total_committers":1,"mean_commits":132.0,"dds":0.0,"last_synced_commit":"033a8130b6263529ee828c63927ecc29a835c842"},"previous_names":["aliosm/phlex-icons"],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AliOsm%2Fphlex-icons","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AliOsm%2Fphlex-icons/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AliOsm%2Fphlex-icons/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AliOsm%2Fphlex-icons/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AliOsm","download_url":"https://codeload.github.com/AliOsm/phlex-icons/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232995461,"owners_count":18608558,"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":["bootstrap-icons","flag-icons","heroicons","lucide-icons","phlex","radix-ui-icons","remixicons","ruby-on-rails","svg","tabler-icons"],"created_at":"2024-09-16T23:01:39.547Z","updated_at":"2025-01-08T10:30:44.621Z","avatar_url":"https://github.com/AliOsm.png","language":"Ruby","funding_links":[],"categories":["Ruby","Icon Packs"],"sub_categories":["Libraries"],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"phlex-icons.png\" alt=\"Phlex Icons\" width=\"500\"\u003e\n\n  [![Gem Version](https://badge.fury.io/rb/phlex-icons.svg)](https://badge.fury.io/rb/phlex-icons)\n  ![rubocop](https://github.com/AliOsm/phlex-icons/actions/workflows/rubocop.yml/badge.svg?branch=main)\n  [![Ruby Style Guide](https://img.shields.io/badge/code_style-rubocop-brightgreen.svg)](https://github.com/rubocop/rubocop)\n  ![Ruby Version](https://img.shields.io/badge/ruby_version-\u003e=_3.0.0-blue.svg)\n\n\u003c/div\u003e\n\n# PhlexIcons\n\nGeneral icons extension for [Phlex](https://phlex.fun). Includes more than 🎨 12,000 icons from:\n- [Bootstrap Icons](https://icons.getbootstrap.com) (2,000+)\n- [Flag Icons](https://flagicons.lipis.dev) (250+)\n- [Heroicons](https://heroicons.com) (300+)\n- [Lucide Icons](https://lucide.dev/icons) (1,500+)\n- [RadixUI Icons](https://radix-ui.com/icons) (300+)\n- [Remix Icons](https://remixicon.com) (2,800+)\n- [Tabler Icons](https://tabler.io/icons) (4,800+)\n\nAnd happy to extend to other icon packs!\n\nIf you don't want to add all icon packs to your application, you can add a specific icon pack by using one (or multiple) of the following gems:\n\n- [phlex-icons-bootstrap](https://rubygems.org/gems/phlex-icons-bootstrap)\n- [phlex-icons-flag](https://rubygems.org/gems/phlex-icons-flag)\n- [phlex-icons-hero](https://rubygems.org/gems/phlex-icons-hero)\n- [phlex-icons-lucide](https://rubygems.org/gems/phlex-icons-lucide)\n- [phlex-icons-radix](https://rubygems.org/gems/phlex-icons-radix)\n- [phlex-icons-remix](https://rubygems.org/gems/phlex-icons-remix)\n- [phlex-icons-tabler](https://rubygems.org/gems/phlex-icons-tabler)\n\nThanks [nejdetkadir](https://github.com/nejdetkadir) for creating [Phlex::Heroicons](https://github.com/nejdetkadir/phlex-heroicons) as it was the base for this gem.\n\nOther Phlex icon gems:\n- [phlex-remixicon](https://github.com/danieldocki/phlex-remixicon)\n- [phlex-lucide](https://github.com/akodkod/phlex-lucide)\n\n## Installation\n\nInstall the gem and add it to the application's Gemfile by executing:\n\n```bash\nbundle add phlex-icons\n```\n\nIf bundler is not being used to manage dependencies, install the gem by executing:\n\n```bash\ngem install phlex-icons\n```\n\n## Configuration\n\nThe gem provides global configuration options, and per icons pack configuration options.\n\n### Global configuration\n\n```ruby\nPhlexIcons.configure do |config|\n  config.default_classes = 'size-6'\nend\n\n# OR\n\nPhlexIcons.configuration.default_classes = 'size-6'\n```\n\n### Bootstrap Icons configuration\n\nNothing to configure for Bootstrap Icons.\n\n### Flag Icons configuration\n\n```ruby\nPhlexIcons::Flag.configure do |config|\n  config.default_variant = :square # or :rectangle\nend\n\n# OR\n\nPhlexIcons::Flag.configuration.default_variant = :square # or :rectangle\n```\n\n### Heroicons configuration\n\n```ruby\nPhlexIcons::Hero.configure do |config|\n  config.default_variant = :solid # or :outline\nend\n\n# OR\n\nPhlexIcons::Hero.configuration.default_variant = :solid # or :outline\n```\n\n### Lucide Icons configuration\n\nNothing to configure for Lucide Icons.\n\n### RadixUI Icons configuration\n\nNothing to configure for RadixUI Icons.\n\n### Remix Icons configuration\n\nNothing to configure for Remix Icons.\n\n### Tabler Icons configuration\n\n```ruby\nPhlexIcons::Tabler.configure do |config|\n  config.default_variant = :outline # or :filled\nend\n\n# OR\n\nPhlexIcons::Tabler.configuration.default_variant = :outline # or :filled\n```\n\n## Usage\n\n### With `Phlex::Kit`\n\n```ruby\nrequire 'phlex-icons' # No need to require the gem if you are using it in a Rails application.\n\nclass PhlexIcons \u003c Phlex::HTML\n  include PhlexIcons\n\n  def view_template\n    div do\n      Bootstrap::House(class: 'size-4')\n      Flag::Sa(variant: :rectangle, class: 'size-4')\n      Hero::Home(variant: :solid, class: 'size-4')\n      Lucide::House(class: 'size-4')\n      Radix::Home(class: 'size-4')\n      Remix::HomeLine(class: 'size-4')\n      Tabler::Home(variant: :filled, class: 'size-4')\n    end\n  end\nend\n```\n\n### Without `Phlex::Kit`\n\n```ruby\nrequire 'phlex-icons' # No need to require the gem if you are using it in a Rails application.\n\nclass PhlexIcons \u003c Phlex::HTML\n  def view_template\n    div do\n      render PhlexIcons::Bootstrap::House.new(class: 'size-4')\n      render PhlexIcons::Flag::Sa.new(variant: :rectangle, class: 'size-4')\n      render PhlexIcons::Hero::Home.new(variant: :solid, class: 'size-4')\n      render PhlexIcons::Lucide::House.new(class: 'size-4')\n      render PhlexIcons::Radix::Home.new(class: 'size-4')\n      render PhlexIcons::Remix::HomeLine.new(class: 'size-4')\n      render PhlexIcons::Tabler::Home.new(variant: :filled, class: 'size-4')\n    end\n  end\nend\n```\n\n### Specific icon pack(s)\n\nLet's say you want to use only Heroicons and Flag Icons, you can use the following gems:\n- [phlex-icons-flag](https://rubygems.org/gems/phlex-icons-flag)\n- [phlex-icons-hero](https://rubygems.org/gems/phlex-icons-hero)\n\nThen, in your application, you can use the icons like this:\n\n```ruby\nrequire 'phlex-icons-flag' # No need to require the gem if you are using it in a Rails application.\nrequire 'phlex-icons-hero' # No need to require the gem if you are using it in a Rails application.\n\nclass PhlexIcons \u003c Phlex::HTML\n  include PhlexIcons # If you want to use Phlex::Kit.\n\n  def view_template\n    div do\n      # With Phlex::Kit.\n      Flag::Sa(variant: :rectangle, class: 'size-4')\n      Hero::Home(variant: :solid, class: 'size-4')\n\n      # Without Phlex::Kit.\n      render PhlexIcons::Flag::Sa.new(variant: :rectangle, class: 'size-4')\n      render PhlexIcons::Hero::Home.new(variant: :solid, class: 'size-4')\n    end\n  end\nend\n```\n\n### Add custom icons to your Rails application\n\nYou can extend the gem in your Rails application to add new icons by creating a `phlex-icons/custom` directory inside `views/components` directory. Then, you can create a new component for each icon you want to add. For example:\n\n```ruby\n# app/views/components/phlex-icons/custom/icon_class_name.rb\n\nmodule PhlexIcons\n  module Custom\n    class IconClassName \u003c PhlexIcons::Base\n      def view_template\n        # SVG code here.\n      end\n    end\n  end\nend\n```\n\nFinally, you will need to create a `PhlexIcons::Custom` module in `phlex-icons/custom.rb` file to include your custom icons and make them a `Phlex::Kit`:\n\n```ruby\n# app/views/components/phlex-icons/custom.rb\n\nmodule PhlexIcons\n  module Custom\n    extend Phlex::Kit\n  end\nend\n```\n\nNow, you can use your custom icons like any other icon pack as described above.\n\n## Update icon packs\n\nAll icon packs provided in this gem are auto-generated by their generator under [`generators`](/generators) directory. You just need to clone the repo and run the generator for the icon pack you want to update. Also, there is a GitHub Action that will run the generator for all icon packs and update the gem weekly on each Friday.\n\n## What is the icon pack version used in the gem?\n\nEach icon pack contains a `VERSION` constant in its module represents the version of the icon pack used in the gem. So, for example, to get the Bootstrap version used in the gem you can access it by `PhlexIcons::Bootstrap::VERSION`.\n\n## Development\n\nAfter checking out the repo, open it in VSCode and click `Reopen in Container` to start a development container. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/AliOsm/phlex-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/AliOsm/phlex-icons/blob/master/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 PhlexIcons project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/AliOsm/phlex-icons/blob/master/CODE_OF_CONDUCT.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAliOsm%2Fphlex-icons","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAliOsm%2Fphlex-icons","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAliOsm%2Fphlex-icons/lists"}