No commit activity in last 3 years
No release in over 3 years
Adds Font Awesome tag helpers.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

 Project Readme

FontAwesomeTagHelper¶ ↑

tag helper methods for Font Awesome icons

Usage¶ ↑

icon_tag :icon_name, options_hash

Examples¶ ↑

icon_tag :search

produces:

<i class"icon-search"></i>

icon_tag :search, { id: "search", name: "search_icon" }

produces:

<i id="search" name="search_icon" class="icon-search"></i>

icon_tag :search, { id: "search", name: "search_icon", large: true, pull: "right" }

produces:

<i id="search" name="search_icon" class"icon-search icon-large pull-right"></i>

Available Options¶ ↑

  • id the value of the id attribute. Accepts a string.

  • name the value of the name attribute. Accepts a string.

  • size increases the size of the icon. Adds icon-2x, icon-3x or icon-4x to the class when the value is set to a valid multiplayer 2, 3 or 4. Accepts an integer.

  • large increases the size of the icon. Adds icon-large to the class when the value is set to true. Accepts a boolean.

  • border includes a border around the icon. Adds icon-border to the class when the value is set to true. Accepts a boolean.

  • pull orientates the icon to the left or right. Adds pull-left or pull-right to the class when the value is set to left or right. Accepts a string.

  • spin animates the icon. Adds icon-spin to the class when the value is set to true. Accepts a boolean.

  • li or list formats the icon for a list. Adds icon-li to the class when the value is set to true. Accepts a boolean.

  • width increases the width to the width of the parent element. Adds icon-fixed-width to the class when the value is set to fixed. Accepts a string.

  • rotate turns the icon the specified number of degrees. Adds icon-rotate-90, icon-rotate-180 or icon-rotate-270 to the class when the value is set to 90, 180 or 270. Accepts an integer.

  • width flips the icon. Adds icon-flip-horizontal or icon-flip-vertical to the class when the value is set to horizontal or vertical. Accepts a string.