Icon React Component

Icon React component represents Icon element. It is ready to be used with custom icons, Framework7 Icons, Material Icons, Font Awesome, Ionicons.

Icon Components

There are following components included:

  • **Icon** / **F7Icon**

Icon Properties

PropTypeDescription
sizenumber
string
Icon size in px
iconstringCustom icon class
f7stringName of F7 Icons font icon
materialstringName of Material Icons font icon
fastringName of Font Awesome font icon
ionstringName of Ionicons font icon
iosstringIcon to be used in case of iOS theme is used. Consists of icon family and icon name divided by colon, e.g. f7:home or ion:home
mdstringIcon to be used in case of Material theme is used. Consists of icon family and icon name divided by colon, e.g. material:home or fa:home
tooltipstringIcon tooltip text to show on icon hover/press

Examples

  1. {/* Default back icon */}
  2. <Icon icon="icon-back"></Icon>
  3. {/* Some custom icon */}
  4. <Icon icon="icon-home"></Icon>
  5. {/* F7 Icons font icon */}
  6. <Icon f7="home"></Icon>
  7. {/* Material Icons font icon */}
  8. <Icon material="home"></Icon>
  9. {/* Font Awesome icons font icon */}
  10. <Icon fa="home"></Icon>
  11. {/* Ionicons icons font icon */}
  12. <Icon ion="home"></Icon>
  13. {/* F7 icons font icon with custom size and color */}
  14. <Icon f7="home" size="44px" color="blue"></Icon>
  15. {/* Conditional icon */}
  16. <Icon ios="f7:home" md="material:home"></Icon>