react-native-elements

https://reactnativeelements.com/docs是一套UI组件库

Icon

基本用法

1
2
3
4
5
6
7
8

<Icon
type="MaterialIcons"
name="delete"
size={24}
color="#D1D1D6"
onPress={() => console.log('delete')}
/>

属性

  • name:
  • type:支持的类型,查阅https://reactnativeelements.com/docs/1.2.0/icon#available-icon-sets具体类型
    • material
    • material-community
    • font-awesome
    • octicon
    • ionicon
    • foundation
    • evilicon
    • simple-line-icon
    • zocial
    • entypo
    • feather
    • antdesign
  • size:
  • color:
  • iconStyle:
  • Component:
  • disabled:
  • disabledStyle:
  • onPress:
  • onLongPress:
  • underlayColor:
  • reverse:
  • raised:
  • containerStyle:
  • reverseColor:

使用react-native-vector-icons,在https://oblador.github.io/react-native-vector-icons/查询图标名称和类型。

参考