Menu

Introducing Hanami Icons
📰

Introducing Hanami Icons

DEV Community: ruby·Rails Designer·11 days ago
#mxC8GOGo
#devtoruby#devto#dev#icons#hanami
Reading 0:00
15s threshold

Most of what can be read here is around and for Ruby on Rails. My main apps still are powered by it. But monopolies are never good. Hanami is the one I get most excited about.

It is why I extracted the core features (pulling SVGs from remote repository, transforming filenames, etc.) of Rails Icons into a Ruby gem, called Icons , so other frameworks can have all the icons in their apps as well.

Hanami Icons is the next wrapper of the Icons gem for… drumroll… Hanami! It gives you the same interface as Rails Icons too, whether that is Heroicons, Lucide, Tabler or even a folder of your own SVGs.

<%= = icon "check" , class: "text-gray-500" %>

<%= = icon "apple" , library: "simple_icons" , class: "text-black" %>

Enter fullscreen mode

Exit fullscreen mode

if you have seen Rails icons, you know Hanami Icons.

One interface, all the libraries

The work is done in Icons. If you do not know it: it syncs SVGs from their source repositories, normalizes names, handles variants and builds sprite markup.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.