Late 2024 I published Rails Icons 1.0 (slighly off-topic, but I mentioned a modest few thousand downloads in that article; now it is close to 250k; I expect the same + a bit more for Perron). Today I like to re-introduce Rails Icons again to you: here is version 1.8.
(I did not expect SVG icons could be this exciting; and I have a few more ideas still! π€―)
First I extracted the sync and SVG creation logic (the bit people have copy-pasted instead of using/contributing to the gem) into its own gem: Icons, I wrote about it here. The main goal was to make the βbehind-the-scenesβ architecture (syncing, normalizing icon names, etc.) available for others to build a similar gem for their framework of choice like Hanami, Roda and so on. That logic is novel and could be used in any kind of Ruby app. This keeps the Rails Icons even more light-weight and allows me to add features I want to share with you today.
Like (experimental) support for Ruby LSP.
This allows you to write icon "|" in your IDE and it will show a completion dialog for all synced icon names. This works also with variant and library name. It is still early stage and would love some help from you if you are experienced with Ruby LSP. π
Then a feature I have had on my list for well over a year: a preview of all your icons π»
Simply add mount RailsIcons::Engine => "rails_cons" to your routes and you are presented with this lovely view:
Here you can:
- search by icon name and by related keyword (added small mappings for all Rails Iconsβ supported libraries, hence you can search for
nature,vehicleandtravelπ) - copy name
- copy helper (so for above screenshot it copies:
icon('bulldozer'), and it will add the variant if that one is not your configured default variant π‘) - query is stored in url so it shareable with your team (of LLM bots π)
I think this is pretty cool! π
I thought these two three big features were well worth a re-introduction. If you havenβt checked it out, it is here on GitHub. Be sure to star β it! βοΈ
If you are already using Rails Icons, be sure to add your project to the list. Downloads and stars are nice and all for the larger community, usage in real projects are a true motivator for the maintainer (i.e. me).


Top comments (0)