Installation

npm install boring-avatars

Usage

Import the component and use it in your React application:

import Avatar from "boring-avatars";

<Avatar name="Margaret Brent"/>

Props

Name

The name prop is used to generate the avatar. It can be the username, email or any random string.

<Avatar name="Maria Mitchell"/>

Variant

The variant prop is used to change the theme of the avatar. The available variants are: marble, beam, pixel, sunset, ring and bauhaus.

<Avatar name="Alice Paul" variant="beam"/>

Size

The size prop is used to change the size of the avatar.

<Avatar name="Mary Edwards" size={80}/>

Colors

The colors prop is used to change the color palette of the avatar.

<Avatar name="Margaret Brent" colors={["#92A1C6", "#146A7C", "#F0AB3D", "#C271B4", "#C20D90"]}/>

Square

The square prop is used to change the shape of the avatar.

<Avatar name="Margaret Brent" square/>