Avatar
Avatar component.
PropTypes
Prop | Type | Description |
---|---|---|
backgroundColor | string | Background color for Avatar. Default Colors.dark80 |
containerStyle | View style | Additional spacing styles for the container |
imageSource | object or number | The image source (external or assets) |
label | string | Label that can represent initials |
labelColor | string | The label color. Default Colors.dark10. |
ribbonLabel | string | Ribbon label to display on the avatar |
ribbonStyle | View style | Ribbon custom style |
ribbonLabelStyle | Text style | Ribbon label custom style |
isOnline | bool | Determine if to show online badge |
size | number | Custom size for the Avatar. Default 50. |
onPress | func | Press handler |
Usage
import {Colors, Avatar} from 'react-native-ui-lib';
<Avatar containerStyle={{marginVertical: 5}} ribbonLabel={'New'} />
<Avatar containerStyle={{marginVertical: 5}} label={'ES'} isOnline={true} backgroundColor={Colors.violet60} />