Skip to main content

Avatar

Image Avatars

Get image avatars by simply using the src prop.

import React from 'react';
import { Avatar } from 'chic-ui';

<Avatar src="cat1.png" />
<Avatar src="cat2.png" />
<Avatar src="cat3.png" />

Lettered Avatars

Get lettered avatars by simply using the name prop.

KSD
import React from 'react';
import { Avatar } from "chic-ui";
<Avatar name="KS" />
<Avatar name="D" />

Active Avatars

isActive prop can be used to show active avatars.

KS
import React from 'react';
import { Avatar } from 'chic-ui';

<Avatar name="KS" isActive />
<Avatar src="cat2.png" isActive />

API

import { Avatar } from 'chic-ui';
NameTypeDefaultDescription
srcstringPath of the image for the avatar
namestringAlphabets for the avatar
isActivebooleanfalseActive state for the avatar
widthnumber80Width of avatar
heightnumber80Height of avatar
classNamestringProvide external classnames to the component
styleReact.CSSPropertiesOverride default styling of the component