1.0.15 • Published 1 year ago

vue3-avataaars v1.0.15

Weekly downloads
-
License
-
Repository
github
Last release
1 year ago

vue3-avataaars

Simple random avatar generation for Vue3.

Implemented with avataaars designed by Pablo Stanley and inspired by Or Gordin's vuejs-avataaars.

Installation

npm install vue3-avataaars

Usage

While the library enables random avatars, the component itself requires a full set of parameters. The assumption here is that it is useful to know what parameters went into creating an avatar. For example, so that those parameters can be persisted.

import { Avatar, Factory } from 'vue3-avataaars';
const props = Factory()
<Avatar v-bind="props" />

Parameters

The list of available parameters can be viewed in Types.ts.

{
  isCircle: boolean, // Place avatar in a background-circle

  circleColor?: Hex,
  hairColor: Hex,
  skinColor: Hex,
  clothesColor: Hex,
  topColor: Hex,
  facialHairColor: Hex,

  clothes: keyof typeof Clothes,
  graphicShirt: keyof typeof GraphicShirt,
  top: keyof typeof Tops,
  accessories: keyof typeof Accessories,
  facialHair: keyof typeof FacialHair,
  eyes: keyof typeof Eyes,
  eyebrows: keyof typeof Eyebrows,
  mouth: keyof typeof Mouths,
}

A very simple implementation can be seen in action at vue3-avataaars.com

1.0.15

1 year ago

1.0.14

2 years ago

1.0.13

2 years ago

1.0.12

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago