{"id":13877876,"url":"https://github.com/Rails-Designer/rails_icons","last_synced_at":"2025-07-16T13:32:52.272Z","repository":{"id":233279598,"uuid":"764639337","full_name":"Rails-Designer/rails_icons","owner":"Rails-Designer","description":"  Add SVG icons from multiple libraries, or your own custom icon set, with this one gem","archived":false,"fork":false,"pushed_at":"2024-11-04T08:53:09.000Z","size":703,"stargazers_count":36,"open_issues_count":3,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-14T15:15:39.234Z","etag":null,"topics":["feather-icons","heroicons","icons","lucide-icon","lucide-icons","rails","tabler-icons"],"latest_commit_sha":null,"homepage":"https://railsdesigner.com/rails-icons/","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/Rails-Designer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.txt","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},"funding":{"custom":["https://railsdesigner.com/pricing/"]}},"created_at":"2024-02-28T12:55:00.000Z","updated_at":"2024-11-14T10:20:14.000Z","dependencies_parsed_at":"2024-10-23T04:08:16.557Z","dependency_job_id":null,"html_url":"https://github.com/Rails-Designer/rails_icons","commit_stats":null,"previous_names":["rails-designer/rails_icons"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rails-Designer%2Frails_icons","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rails-Designer%2Frails_icons/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rails-Designer%2Frails_icons/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rails-Designer%2Frails_icons/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Rails-Designer","download_url":"https://codeload.github.com/Rails-Designer/rails_icons/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226134226,"owners_count":17578778,"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":["feather-icons","heroicons","icons","lucide-icon","lucide-icons","rails","tabler-icons"],"created_at":"2024-08-06T08:01:33.761Z","updated_at":"2025-07-16T13:32:52.242Z","avatar_url":"https://github.com/Rails-Designer.png","language":"Ruby","funding_links":["https://railsdesigner.com/pricing/"],"categories":["Ruby"],"sub_categories":[],"readme":"# Rails Icons\n\nAdd any icon library to a Rails app. Rails Icons has first-party support for a [handful of libraries](#first-party-libraries). It is library agnostic so it can be used with any icon library using the same interface.\n\n![Rails Icons - A collection of icons from popular libraries like Feather, Lucide, and Heroicons arranged in a grid pattern around the title text](https://raw.githubusercontent.com/Rails-Designer/rails_icons/HEAD/.github/cover.jpg)\n\n```erb\n# Using the default icon library\nicon \"check\", class: \"text-gray-500\"\n\n# Using any custom library\nicon \"apple\", library: \"simple_icons\", class: \"text-black\"\n```\n\nThe icons are sourced directly from their respective GitHub repositories, ensuring Rails Icons remain lightweight.\n\n\n**Sponsored By [Rails Designer](https://railsdesigner.com/)**\n\n\u003ca href=\"https://railsdesigner.com/\" target=\"_blank\"\u003e\n  \u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/Rails-Designer/rails_icons/HEAD/.github/logo-dark.svg\"\u003e\n    \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://raw.githubusercontent.com/Rails-Designer/rails_icons/HEAD/.github/logo-light.svg\"\u003e\n    \u003cimg alt=\"Rails Designer\" src=\"https://raw.githubusercontent.com/Rails-Designer/rails_icons/HEAD/.github/logo-light.svg\" width=\"240\" style=\"max-width: 100%;\"\u003e\n  \u003c/picture\u003e\n\u003c/a\u003e\n\nWant to make JavaScript your second-favorite language? 👉 [JavaScript for Rails Developers](https://javascriptforrails.com/)\n\n\n## Install\n\nAdd the gem\n```bash\nbundle add rails_icons\n```\n\nInstall, choosing one of the supported libraries\n```bash\nrails generate rails_icons:install --libraries=LIBRARY_NAME\n```\n\n**Example**\n```bash\nrails generate rails_icons:install --libraries=heroicons\n\n# Or multiple at once\nrails generate rails_icons:install --libraries=heroicons lucide\n```\n\n\n## Usage\n\n```ruby\n# Uses the default library and variant defined in config/initializer/rails_icons.rb\nicon \"check\"\n\n# Use another variant\nicon \"check\", variant: \"solid\"\n\n# Set library explicitly\nicon \"check\", library: \"heroicons\"\n\n# Add CSS\nicon \"check\", class: \"text-green-500\"\n\n# Add CSS with class_names\nicon \"check\", class: [\"size-4\", \"bg-red-500\": !verified?, \"bg-green-500\": verified?]\n# ↳ Article: https://railsdesigner.com/conditional-css-classes-in-rails/\n# ↳ Documentation: https://edgeapi.rubyonrails.org/classes/ActionView/Helpers/TagHelper.html#method-i-token_list\n\n# Add data attributes\nicon \"check\", data: { controller: \"swap\" }\n\n# Set the stroke-width\nicon \"check\", stroke_width: 2\n```\n\n\n## First-party libraries\n\n- [Boxicons](https://railsdesigner.com/rails-icons/boxicons/) (1600+ icons)\n- [Feather](https://railsdesigner.com/rails-icons/feather/) (280+ icons)\n- [Flags](https://railsdesigner.com/rails-icons/flags/) (540+ icons)\n- [Heroicons](https://railsdesigner.com/rails-icons/heroicons/) (300+ icons)\n- [Linear](https://railsdesigner.com/rails-icons/linear/) (170+ icons)\n- [Lucide](https://railsdesigner.com/rails-icons/lucide/) (1500+ icons)\n- [Phosphor](https://railsdesigner.com/rails-icons/phosphor/) (9000+ icons)\n- [Radix](https://railsdesigner.com/rails-icons/radix/) (300+ icons)\n- [SidekickIcons](https://railsdesigner.com/rails-icons/sidekickicons/) (49 icons, complementing [Heroicons](https://railsdesigner.com/rails-icons/heroicons/))\n- [Tabler](https://railsdesigner.com/rails-icons/tabler/) (5700+ icons)\n- [Weather](https://railsdesigner.com/rails-icons/weather/) (215+ icons)\n\n\n## Animated icons\n\nRails Icons also includes a few animated icons. Great for loading states and so on. These are currently included:\n\n- `faded-spinner`\n- `trailing-spinner`\n- `fading-dots`\n- `bouncing-dots`\n\nUse like this: `icon \"faded-spinner\", library: \"animated\"`. The same attributes as the other libraries are available.\n\n\n## Custom icon library\n\nNeed to use an icon from another library?\n\n1. run `rails generate rails_icons:initializer --custom=simple_icons`;\n2. add the (SVG) icons to the created directory *app/assets/svg/icons/simple_icons*;\n\nEvery custom icon can now be used with the same interface as first-party icon libraries.\n```ruby\nicon \"apple\", library: \"simple_icons\", class: \"text-black\"\n```\n\n\n## Sync icons\n\nTo sync all libraries, run\n```bash\nrails generate rails_icons:sync\n```\n\nTo sync only a specific library, run\n```bash\nrails generate rails_icons:sync --libraries=heroicons\n\n# Or multiple at once:\nrails generate rails_icons:sync --libraries=heroicons lucide\n```\n\n\n## Contributing\n\nThis project uses [Standard](https://github.com/testdouble/standard) for formatting Ruby code. Please make sure to run `be standardrb` before submitting pull requests. Run tests via `rails test`.\n\n\n## License\n\nRails Icons is released under the [MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FRails-Designer%2Frails_icons","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FRails-Designer%2Frails_icons","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FRails-Designer%2Frails_icons/lists"}