All Projects → dapilab → react-nice-avatar

dapilab / react-nice-avatar

Licence: MIT license
react library for generating avatar

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to react-nice-avatar

boring-avatars
Boring avatars is a tiny JavaScript React library that generates custom, SVG-based avatars from any username and color palette.
Stars: ✭ 3,582 (+411.71%)
Mutual labels:  avatar, avatar-generator, avatar-placeholder
monsterid
MonsterID adaptation for Composer and modern PHP versions
Stars: ✭ 20 (-97.14%)
Mutual labels:  avatar, avatar-generator, avatar-placeholder
identicon-api
A simple API to retrieve SVG identicons
Stars: ✭ 15 (-97.86%)
Mutual labels:  avatar, avatar-generator, avatar-placeholder
AvatarGAN
Generate Cartoon Images using Generative Adversarial Network
Stars: ✭ 24 (-96.57%)
Mutual labels:  avatar, avatar-generator
icodi
Deterministic Random SVG Icon Generator
Stars: ✭ 18 (-97.43%)
Mutual labels:  avatar-generator, avatar-placeholder
avatarcropper
Simple quick avatar cropper!
Stars: ✭ 45 (-93.57%)
Mutual labels:  avatar, avatar-generator
monsterID
The original MonsterID implementation
Stars: ✭ 56 (-92%)
Mutual labels:  avatar, avatar-generator
AvatarImageGenerator
Android library to generate image avatar from the first letter of a username. Letter avatar like Gmail Android best practice
Stars: ✭ 61 (-91.29%)
Mutual labels:  avatar-generator, avatar-placeholder
github-avatar-generator
Generate github-style avatar with java awt
Stars: ✭ 37 (-94.71%)
Mutual labels:  avatar, avatar-generator
monsterid
Node.js porting of the original PHP library
Stars: ✭ 15 (-97.86%)
Mutual labels:  avatar, avatar-generator
Avataaars Generator
Simple generator React app for avataaars
Stars: ✭ 2,078 (+196.86%)
Mutual labels:  avatar, avatar-generator
minidenticons
Super lightweight SVG identicon (icon avatar) generator
Stars: ✭ 89 (-87.29%)
Mutual labels:  avatar, avatar-generator
pixitar
🧝 Pixitar is an avatar generation library written in Ruby.
Stars: ✭ 20 (-97.14%)
Mutual labels:  avatar, avatar-generator
avatar-gen
pillow 生成头像,中英文首字母或者随机像素化。Using pillow for generate avatars, first letter of string in Chinese and English or random pixel like avatars.
Stars: ✭ 31 (-95.57%)
Mutual labels:  avatar, avatar-generator
ng-person
A universal avatar component for Angular 2+ applications that generates truly unique colored letter avatar based on provided name.
Stars: ✭ 19 (-97.29%)
Mutual labels:  avatar, avatar-placeholder
glAvatar
a glTF extension (extra?) for avatar with switchable skeletons, skins, clothes, etc.
Stars: ✭ 30 (-95.71%)
Mutual labels:  avatar
AccountPhoto
Map a universal avatar against your EOS blockchain account (stored using the IPFS protocol).
Stars: ✭ 13 (-98.14%)
Mutual labels:  avatar
material-combiner-addon
Blender addon for material combining, uv bounds fixing
Stars: ✭ 309 (-55.86%)
Mutual labels:  avatar
avatar-gen
一个随机头像生成器的纯前端实现
Stars: ✭ 354 (-49.43%)
Mutual labels:  avatar
Steam-Scripts
Steam userscripts
Stars: ✭ 76 (-89.14%)
Mutual labels:  avatar

react-nice-avatar

Version npm download Build Status Netlify Status

Online editor / preview

Assets

Installation

npm install react-nice-avatar

or

yarn add react-nice-avatar

Usage

  1. Import the component.

    import Avatar, { genConfig } from 'react-nice-avatar'
  2. Generate a random configuration, save it so that you can always rendering a same avatar with the configuration.

    const config = genConfig(AvatarConfig?) 

    tip: AvatarConfig is an Object, plz check the Options below for what attributes can be passed in

  3. Render the component with specific width / height and configuration.

    <Avatar style={{ width: '8rem', height: '8rem' }} {...config} />

    or

    <Avatar className="w-32 h-32" {...config} />

Options

The options can be passed into genConfig or as React props

key type default accept tips
id string Only for React Props
className string Only for React Props
style object Only for React Props
shape string circle circle, rounded, square Only for React Props
sex string man, woman
faceColor string
earSize string small, big
hairColor string
hairStyle string normal, thick, mohawk, womanLong, womanShort
hairColorRandom boolean false thick,mohawk default only be black
hatColor string
hatStyle string none, beanie, turban Usually is none
eyeStyle string circle, oval, smile
glassesStyle string none, round, square Usually is none
noseStyle string short, long, round
mouthStyle string laugh, smile, peace
shirtStyle string hoody, short, polo
shirtColor string
bgColor string
isGradient boolean false

Development

  1. Clone the repo:
    $ git clone [email protected]:dapi-labs/react-nice-avatar.git
    $ cd react-nice-avatar
  2. Install dependencies:
    $ yarn
    Or
    $ npm install
  3. Start the server for the demo:
    $ make dev
  4. Open the browser to reivew the demo:
    $ open http://localhost:8080
  5. Edit the files inside src.

Test

  1. Lint test:

    $ make lint-test
  2. code test:

    $ make test

License

Released under MIT by @dapi-labs.




Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].