Version: 3.0.0-next.36

Icon

You can use icons in multiple ways in NativeBase:

  • Use @expo/vector-icons in your components
  • Create icon by creating an SVG Icon
  • Create icon using createIcon function and use it as a component

Implements#

Examples#

Basic#

Apart from the icons provided by @expo/vector-icon, you can also create custom icons using SVG. You can use all the components from react-native-svg.

Custom#

createIcon#

Props#

Icon#

NameTypeDescriptionDefault
namestringThe name of icon.-
typeIconTypeThe type of the icon.-
viewBoxstringThe viewBox of the icon.-
colorstringThe color of the icon.-
focusablebooleanDenotes whether the icon is an interactive element.-
strokestring-
strokeWidthstring-

CreateIcon#

NameTypeDescriptionDefault
viewBoxstringThe viewBox of the icon-
dstringThe path of the SVG icon-
pathJSX.Elementpath element of the icon-