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. Addsicon-2x
,icon-3x
oricon-4x
to the class when the value is set to a valid multiplayer2
,3
or4
. Accepts an integer. -
large
increases the size of the icon. Addsicon-large
to the class when the value is set totrue
. Accepts a boolean. -
border
includes a border around the icon. Addsicon-border
to the class when the value is set totrue
. Accepts a boolean. -
pull
orientates the icon to the left or right. Addspull-left
orpull-right
to the class when the value is set toleft
orright
. Accepts a string. -
spin
animates the icon. Addsicon-spin
to the class when the value is set totrue
. Accepts a boolean. -
li
orlist
formats the icon for a list. Addsicon-li
to the class when the value is set totrue
. Accepts a boolean. -
width
increases the width to the width of the parent element. Addsicon-fixed-width
to the class when the value is set tofixed
. Accepts a string. -
rotate
turns the icon the specified number of degrees. Addsicon-rotate-90
,icon-rotate-180
oricon-rotate-270
to the class when the value is set to90
,180
or270
. Accepts an integer. -
width
flips the icon. Addsicon-flip-horizontal
oricon-flip-vertical
to the class when the value is set tohorizontal
orvertical
. Accepts a string.