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¶ ↑
-
idthe value of the id attribute. Accepts a string. -
namethe value of the name attribute. Accepts a string. -
sizeincreases the size of the icon. Addsicon-2x,icon-3xoricon-4xto the class when the value is set to a valid multiplayer2,3or4. Accepts an integer. -
largeincreases the size of the icon. Addsicon-largeto the class when the value is set totrue. Accepts a boolean. -
borderincludes a border around the icon. Addsicon-borderto the class when the value is set totrue. Accepts a boolean. -
pullorientates the icon to the left or right. Addspull-leftorpull-rightto the class when the value is set toleftorright. Accepts a string. -
spinanimates the icon. Addsicon-spinto the class when the value is set totrue. Accepts a boolean. -
liorlistformats the icon for a list. Addsicon-lito the class when the value is set totrue. Accepts a boolean. -
widthincreases the width to the width of the parent element. Addsicon-fixed-widthto the class when the value is set tofixed. Accepts a string. -
rotateturns the icon the specified number of degrees. Addsicon-rotate-90,icon-rotate-180oricon-rotate-270to the class when the value is set to90,180or270. Accepts an integer. -
widthflips the icon. Addsicon-flip-horizontaloricon-flip-verticalto the class when the value is set tohorizontalorvertical. Accepts a string.