Releases: maful/ruby-phosphor-icons
v0.3.0
v0.2.0
v0.1.0
I am excited to announce the first release of the phosphor_icons
gem, a powerful tool for easily including Phosphor Icons in your Ruby and Rails applications. With the phosphor_icons
gem, you can enhance your user interfaces with a wide variety of stunning and customizable icons.
Installation
Installing the phosphor_icons
gem is a breeze. Simply add the following line to your Gemfile:
gem "phosphor_icons"
Then run the bundle command to install the gem:
bundle install
Usage in Rails
If you're using Rails, integrating Phosphor Icons into your views is a piece of cake. Just use the phosphor_icon
helper directly in your views:
<%= phosphor_icon "alarm" %>
This will render the Phosphor Icons with the name "alarm" in SVG format.
Usage in Non-Rails Applications
For non-Rails Ruby applications, you can simply require the "phosphor_icons" gem in your code:
require "phosphor_icons"
icon = PhosphorIcons::Icon.new("alarm")
icon.to_svg
# <svg class="phosphor-icon" viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path d="M128,32a96,96,0,1,0,96,96A96.11,96.11,0,0,0,128,32Zm0,176a80,80,0,1,1,80-80A80.09,80.09,0,0,1,128,208ZM61.66,29.66l-32,32A8,8,0,0,1,18.34,50.34l32-32A8,8,0,1,1,61.66,29.66Zm176,32a8,8,0,0,1-11.32,0l-32-32a8,8,0,0,1,11.32-11.32l32,32A8,8,0,0,1,237.66,61.66ZM184,120a8,8,0,0,1,0,16H128a8,8,0,0,1-8-8V72a8,8,0,0,1,16,0v48Z"/></svg>
This will create an instance of the Phosphor Icons with the name "alarm" and output its SVG representation.
I hope you enjoy using the phosphor_icons
gem to add beautiful and customizable Phosphor Icons to your Ruby and Rails applications. Stay tuned for more updates and enhancements in future releases.