New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

heroicons-rails

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

heroicons-rails

  • 1.2.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Heroicons on Rails Heroicons Rails

Easiest way to use Heroicons in your Rails application. This project adds a view helper to render the beautiful hand-crafted SVG icons, by the makers of Tailwind CSS. All icons in Heroicons v2.0.11 are supported.

This project has no affiliation with Tailwind Labs. You can check out all icons at Heroicons website.

Installation

Add heroicons-rails to your Gemfile by running:

bundle add heroicons-rails

Or add it manually:

gem "heroicons-rails"

Usage

After adding the gem in your Gemfile you can start to use heroicon_tag helper in your Rails application:

<%= heroicon_tag "plus" %>

Heroicons currently have two sets (solid, outline) and two sizes (20, 24). You can specify them as keyword arguments:

<%= heroicon_tag "plus", variant: :outline, size: 20 %>

This gem defaults the variant to :solid and size to 24.

Any additional keyword parameters will be added as HTML attributes of the svg element:

<%= heroicon_tag "plus", class: "w-5 h-5", "data-controller": "disclosure" %>

Will result in:

<svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24" fill="currentColor" class="w-5 h-5" data-controller="disclosure">
    <path fill-rule="evenodd" d="M12 ..." clip-rule="evenodd"></path>
</svg>

Development

Run the tests with ./bin/rails test.

License

Heroicons Rails is released under the MIT License.

FAQs

Package last updated on 01 Jan 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc