AvatarForm is a small react package to render a svg avatar and the form to generate it from a customizable dataset.
yarn add mesnie-avatar-form
import {AvatarForm, defaultData} from "mesnie-avatar-form";
<AvatarForm data={defaultData} />
see AvatarForm/
for implementation details.
import {FormattedAvatar, defaultData} from "mesnie-avatar-form";
<FormattedAvatar
data={defaultData}
skinColor={"#FF9F9F"}
hairColor={"#241c11"}
eyesColor={"#634e34"}
backgroundColor={"#ecf0f1"}
hairCutId={"A"}
beardCutId={"Z"}
mustacheCutId={"Z"}
mouthShapeId={"A"}
noseShapeId={"A"}
eyesShapeId={"A"}
browsShapeId={"A"}
earsShapeId={"A"}
faceShapeId={"A"}
bodyShapeId={"A"}
clothesId={"A"}
/>
see FormattedAvatar/
for implementation details.
To contribute, you should first fork the project and then
yarn build
yarn start
The AvatarForm
will then be displayed on localhost:3000
.
Next you can add your modifications and test them with yarn test
.