Add Sidekickicons to your Ruby on Rails

Rails Icons is a library-agnostic Rails gem with support for Sidekick Icons. Icons are sourced from the Sidekick Icons GitHub repo. Use any of the 49+ icons in your app.

Install

Add the rails_icons gem:

bundle add rails_icons

Install, by creating the initializer and sync the available icons.

rails generate rails_icons:install --libraries=sidekickicons

Usage

icon "check"

# Add CSS
icon "check", class: "text-green-500"

# Add data attributes
icon "check", data: { controller: "swap" }

Sync icons

If Sidekick Icons gets updated, sync the icons with

rails generate rails_icons:sync
Learn more at the Rails Icons page.