Boring avatars is a tiny JavaScript React library that generates custom, SVG-based, round avatars from any username and color palette.
npm install boring-avatarsBoring avatars is a tiny JavaScript React library that generates custom, SVG-based avatars from any username and color palette.
!hi
```
npm install boring-avatars
`jsx
import Avatar from 'boring-avatars';
`
| Prop | Type | Default |
|---------|--------------------------------------------------------------|-----------------------------------------------------------|
| size | number or string | 40px |false
| square | boolean | |false
| title | boolean | |Clara Barton
| name | string | |marble
| variant | oneOf: , beam, pixel,sunset, ring, bauhaus | marble |['#92A1C6', '#146A7C', '#F0AB3D', '#C271B4', '#C20D90']
| colors | array | |
#### Name
The name prop is used to generate the avatar. It can be the username, email or any random string.
`jsx`
#### Variant
The variant prop is used to change the theme of the avatar. The available variants are: marble, beam, pixel, sunset, ring and bauhaus.
`jsx`
#### Size
The size prop is used to change the size of the avatar.
`jsx`
#### Colors
The colors prop is used to change the color palette of the avatar.
`jsx`
#### Square
The square prop is used to make the avatar square.
`jsx``
> [!IMPORTANT]
> Please note that the old service was paused in July 31st 2024. We recommend transitioning to our new API service to ensure uninterrupted access and support.
Get access to the Boring avatars API service here →.