@memori.ai/avatar-creator
v0.1.3
Published
A simple avatar creator component for [AIsuru](https://www.aisuru.com).
Readme
@memori.ai/avatar-creator
A simple avatar creator component for AIsuru.
Installation
npm i @memori.ai/avatar-creatorUsage
Import the component and its styles:
import AvatarCreator from '@memori.ai/avatar-creator';
import '@memori.ai/avatar-creator/style.css';Use it in your React application:
<AvatarCreator avatars={avatars} lang="en" onSelect={console.log} />Props
interface Avatars {
FEMALE: string[]
MALE: string[]
}| Name | Type | Description |
| --- | --- | --- |
| avatars | Avatars | Array of avatars to choose from, divided by gender |
| lang | string | Language code for the component (en or it) |
| onSelect | (avatarURL: string) => void | Callback function when an avatar is selected |
Development
Install Bun and run the following command to install the dependencies:
To install dependencies:
bun installTo start the development server:
bun devTo run the linter, check the formatting and the import sorting:
bun lintAnd automatically fix relative issues (only safe fixes):
bun fixThis project was created using bun init in bun v1.3.5. Bun is a fast all-in-one JavaScript runtime.
