Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/boringdesigners/boring-avatars

Boring avatars is a tiny JavaScript React library that generates custom, SVG-based avatars from any username and color palette.
https://github.com/boringdesigners/boring-avatars

avatar avatar-component avatar-generator avatar-placeholder avatar-service avatars-constructor beautiful-avatars javascript random-avatars react svg

Last synced: about 1 month ago
JSON representation

Boring avatars is a tiny JavaScript React library that generates custom, SVG-based avatars from any username and color palette.

Awesome Lists containing this project

README

        

# Boring avatars

Boring avatars is a tiny JavaScript React library that generates custom, SVG-based avatars from any username and color palette.

![hi](https://badgen.net/npm/v/boring-avatars)

## Install

```
npm install boring-avatars
```

## Usage

```jsx
import Avatar from 'boring-avatars';

;
```

### Props

| Prop | Type | Default |
|---------|--------------------------------------------------------------|-----------------------------------------------------------|
| size | number or string | `40px` |
| square | boolean | `false` |
| title | boolean | `false` |
| name | string | `Clara Barton` |
| variant | oneOf: `marble`, `beam`, `pixel`,`sunset`, `ring`, `bauhaus` | `marble` |
| colors | array | `['#92A1C6', '#146A7C', '#F0AB3D', '#C271B4', '#C20D90']` |

#### 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

```

## API service

> [!IMPORTANT]
> Please note that the old service will be paused by the end of this month - 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 →](https://boringdesigners.gumroad.com/l/boring-avatars-service).