| id | title |
|---|---|
avatar |
Avatar |
<Avatar
size="small"
rounded
source={{uri: "https://s3.amazonaws.com/uifaces/faces/twitter/ladylexy/128.jpg"}}
onPress={() => console.log("Works!")}
activeOpacity={0.7}
/>
<Avatar
size="medium"
source={{uri: "https://s3.amazonaws.com/uifaces/faces/twitter/kfriedson/128.jpg"}}
onPress={() => console.log("Works!")}
activeOpacity={0.7}
/>
<Avatar
size="large"
source={{uri: "https://s3.amazonaws.com/uifaces/faces/twitter/brynn/128.jpg"}}
onPress={() => console.log("Works!")}
activeOpacity={0.7}
/>
<Avatar
size="xlarge"
rounded
source={{uri: "https://s3.amazonaws.com/uifaces/faces/twitter/adhamdannaway/128.jpg"}}
onPress={() => console.log("Works!")}
activeOpacity={0.7}
/><Avatar
size="small"
rounded
title="MT"
onPress={() => console.log("Works!")}
activeOpacity={0.7}
/>
<Avatar
size="medium"
title="BP"
onPress={() => console.log("Works!")}
activeOpacity={0.7}
/>
<Avatar
size="large"
title="LW"
onPress={() => console.log("Works!")}
activeOpacity={0.7}
/>
<Avatar
size="xlarge"
rounded
title="CR"
onPress={() => console.log("Works!")}
activeOpacity={0.7}
/><Avatar
rounded
icon={{name: 'user'}}
onPress={() => console.log("Works!")}
activeOpacity={0.7}
containerStyle={{flex: 2, marginLeft: 20, marginTop: 115}}
/>
<Avatar
size="small"
rounded
icon={{name: 'user'}}
onPress={() => console.log("Works!")}
activeOpacity={0.7}
containerStyle={{flex: 2, marginLeft: 20, marginTop: 115}}
/>
<Avatar
size="medium"
overlayContainerStyle={{backgroundColor: 'blue'}}
icon={{name: 'meetup', color: 'red'}}
onPress={() => console.log("Works!")}
activeOpacity={0.7}
containerStyle={{flex: 3, marginTop: 100}}
/>
<Avatar
size="large"
icon={{name: 'rocket', color: 'orange'}}
overlayContainerStyle={{backgroundColor: 'white'}}
onPress={() => console.log("Works!")}
activeOpacity={0.7}
containerStyle={{flex: 4, marginTop: 75}}
/>
<Avatar
size="xlarge"
rounded
icon={{name: 'home'}}
onPress={() => console.log("Works!")}
activeOpacity={0.7}
containerStyle={{flex: 5, marginRight: 60}}
/>
<Avatar
size={200}
rounded
icon={{name: 'user'}}
onPress={() => console.log("Works!")}
activeOpacity={0.7}
containerStyle={{flex: 2, marginLeft: 20, marginTop: 115}}
/>activeOpacityavatarStylecomponentcontainerStyleiconiconStyleimagePropsonLongPressonPressoverlayContainerStyleroundedsourcesizetitletitleStyle
Opacity when pressed
| Type | Default |
|---|---|
| number | 0.2 |
Style for avatar image
| Type | Default |
|---|---|
| object (style) | none |
Component for enclosing element (eg: TouchableHighlight, View, etc)
| Type | Default |
|---|---|
| function | TouchableHighlight |
Styling for outer container
| Type | Default |
|---|---|
| object (style) | none |
| Type | Default |
|---|---|
| object {name: string, color: string, size: number, type: string (default is material-community, or choose one of simple-line-icon, zocial, font-awesome, octicon, ionicon, foundation, evilicon, or entypo), iconStyle: object(style)} | none |
Extra styling for icon component (optional)
| Type | Default |
|---|---|
| object (style) | none |
Optional properties to pass to the avatar e.g "resizeMode"
| Type | Default |
|---|---|
| object (imageProperties) | none |
Callback function when long pressing component
| Type | Default |
|---|---|
| function | none |
Callback function when pressing component
| Type | Default |
|---|---|
| function | none |
Style for the view outside image or icon
| Type | Default |
|---|---|
| object (style) | none |
Makes the avatar circular
| Type | Default |
|---|---|
| boolean | false |
Image source
| Type | Default |
|---|---|
| object (style) | none |
Size of the avatar
| Type | Default |
|---|---|
string(small, medium, large, xlarge) or number |
small |
Renders title in the avatar
| Type | Default |
|---|---|
| string | none |
Style for the title
| Type | Default |
|---|---|
| object (style) | none |