Avatar
An image icon used to identify a user.
Version 0.4.1
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
Prop | Type | Default | Description |
---|---|---|---|
alt | string | The alternate text for the image | |
className | string | - | Add a specific class to the avatar |
dataTest | string | - | Add a data-test tag for automated tests |
size | Size | Specifies the size of the avatar | |
src | string | - | Specifies the image url to show |