ons-icon

Displays an icon. Font Awesome and Ionicon icons are supported.

Usage #

<ons-icon
  icon="fa-twitter"
  size="20px"
  fixed-width="false"
  style="color: red">
</ons-icon>

Live Example #

See the Pen Alert, confirm and prompt dialogs by Onsen & Monaca (@onsen) on CodePen.

See also #

Attributes #

Name Type
Default Value
Description
icon String The icon name. fa- prefix for Font Awesome, ion- prefix for Ionicons icons. See all icons at http://fontawesome.io/icons/ and http://ionicons.com. Optional
size String The sizes of the icon. Valid values are lg, 2x, 3x, 4x, 5x, or in pixels. Optional
rotate Number Number of degrees to rotate the icon. Valid values are 90, 180, or 270. Optional
flip String Flip the icon. Valid values are "horizontal" and "vertical". Optional
fixed-width Boolean
false
When used in the list, you want the icons to have the same width so that they align vertically by setting the value to true. Valid values are true, false. Default is false. Optional
spin Boolean
false
Specify whether the icon should be spinning. Valid values are true and false. Optional

Discussion #