Igloo branding

Avatar

An image icon used to identify a user.

Installation

To install @igloo-ui/avatar in your project, you will need to run the following command using npm:

npm install @igloo-ui/avatar

If you prefer Yarn, use the following command instead:

yarn add @igloo-ui/avatar

Usage

Then to use the component in your code just import it!

import Avatar from '@igloo-ui/avatar';

<Avatar src="https://randomuser.me/api/portraits/men/10.jpg" />;

API

PropTypeDescription
altstringThe alternate text for the image
classNamestringAdd a specific class to the avatar
dataTeststringAdd a data-test tag for automated tests
sizeSizeSpecifies the size of the avatar
srcstringSpecifies the image url to show