Code Monkey home page Code Monkey logo

multi-avatars's Introduction

Multi Avatars?

Multi Avatars: πŸŽ‰

multi-avatars is a React component based on the npm package avataaars.

It is random to you depending on what you are giving Or give some other svg avatars.

NOTE: avataaars is a open-source project


Features

  • SVG based
  • Light weight
  • Scalable
  • Easy to use
  • Fast
  • It's don't affect your web performance πŸš€

Usage

for dev:

for use:

First, you need to install the multi-avatars component package, here you run

npm i multi-avatars

Then, in your React app, import the avataaars and multi-avatars component and put it where you like it to be, for example

import Avatars from "multi-avatars";

export default function App() {
  return (
      <Avatars
        avatarStyle={[true, 500]}
        topType={[true, 1000]}
        accessoriesType={[true, 1200]}
        //facialHairType={[true,500]}
        //facialHairType={[true,500]}
        clothesType={[true, 500]}
        clothesColorType={[true, 1000]}
        eyeType={[true]}
        eyebrow={[true, 2000]}
        mouthType={[true, 1200]}
        skinType={["Brown"]}
      />
  );
}

expalin the code: πŸ‘€

  • The first of these is true which gives random avatars parts.

  • The second refers to the number of milliseconds to give / change random avatars parts.

  • Maybe if you only gave true then Avatars will give only once and it will not change after that. Those parts will change only if you give the second millisecond.

For example:

eyeType={[true]}
  • the eyeType only does not change as the above avatar is given only true in eyeType.
skinType = {["Brown"]
  • And if you do not want to change a part of something you can give it(value) directly. Look at the skin color of the avatar in the picture above...

value = Brown

Avatar Options click here to know the avatars options...

  • If you do not give a props something will probably take its default value.

  • But facialHairType only will not appear in the avatar unless you use it alone.

// facialHairType={[true,500]} // if don't wand this field (facialHair), so u do not use this

Hey guys πŸ‘‹ read adout this...

Read my DEV POST✨

resource/info:

multi-avatars's People

Contributors

jacksonkasi0 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.