Skip to main content

Avatar.Image

Avatar.Image components render a pre-styled avatar with an image that can be customized using various props.

Example Avatar

Implementation Code

import { Avatar } from '@nexara/nativeflow';

const Component = () => {
return (
<Avatar.Image
size={60}
source={require('./example.jpg')}
// source={{ uri: 'https://www.xyz.com/user.jpg' }} // Alternative way to use an image
/>
);
};

export default Component;

Props

PropTypeDefaultDescription
sizenumber60Defines the width and height of the avatar.
source{ uri?: string } | numberSpecifies the image source, either as a remote URI or a local asset reference.
bgstringSets the background color of the avatar.
resizeModeNonNullable<ImageProps['resizeMode']>Controls how the image is resized to fit within its container.
containerStyleViewStyleApplies custom styles to the avatar container.
imageStyleStyleProp<ImageStyle>Applies custom styles to the image inside the avatar.