
Research
/Security News
Shai Hulud Strikes Again (v2)
Another wave of Shai-Hulud campaign has hit npm with more than 500 packages and 700+ versions affected.
heroicon
Advanced tools
Ruby on Rails view helpers for the beautiful hand-crafted SVG icons, Heroicons.
Used in production at beehiiv đ
This gem has no official affiliation with Tailwind CSS or the Heroicon team (yet!). Check out their sites:
Add this line to your application's Gemfile:
gem "heroicon"
And then execute:
$ bundle
Run the installer
$ rails g heroicon:install
To use a icon in your views, simply use the provided view helper with the name of an icon.
<%= heroicon "search" %>
Heroicon comes with 3 variants, :outline, :solid and :mini. The default variant is :solid. This can be changed in config/initializers/heroicon.rb, which is generated during installation (See Configuration). To overwrite this in the view, use
<%= heroicon "search", variant: :outline %>
You can also pass HTML options directly to the icon.
<%= heroicon "search", options: { class: "text-primary-500" } %>
Heroicon currently supports icons matching Version 2.0.10. If there is an icon that is missing or a new version released, feel free to contribute by following our contributing guide below.
After running rails g heroicon:install in the installation step, a configuration file will be created at config/initializers/heroicon.rb.
Currently there are two configuration options:
variant: The default variant to use if no variant is specified in the view.
:outline or :solid. Defaults to :solid.default_class: A default class that gets applied to every icon.
disable_default_class: true in the options hash within the view.Note: If you enable the default_class config, make sure to include config/intializers/heroicon.rb in the list of purged paths. For TailwindCSS 3.0+, you should have something like this in your tailwind.config.js:
module.exports = {
//...
content: [
'./app/helpers/**/*.rb',
'./app/javascript/**/*.js',
'./app/views/**/*',
'./config/initializers/heroicon.rb', // đ
],
//...
}
An example configuration looks like this:
Heroicon.configure do |config|
config.variant = :solid
config.default_class = {solid: "h-5 w-5", outline: "h-6 w-6", mini: "h-4 w-4"}
end
Disabling the default class in the view:
<%= heroicon "search", options: { class: "custom-class", disable_default_class: true } %>
Anyone is encouraged to help improve this project. Here are a few ways you can help:
To get started with development:
git clone https://github.com/bharget/heroicon.git
cd heroicon
bundle install
bundle exec rake test
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that heroicon demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
Another wave of Shai-Hulud campaign has hit npm with more than 500 packages and 700+ versions affected.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.