char-avatar
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

char-avatar

Just provide a string, create a character avatar with its own background color

Usage

import { CharAvatar } from "char-avatar"

<CharAvatar str={"字符头像"} width={25} ></CharAvatar>

Params

str: string,

width: number,

bgColor?: string,

textColor?: string,

bgColors?: string[], //bgColors are already preset, you can customize it

cornerRadius?: number,

fontWeight?: number,

fontScale?: number,

pictureResolution?: number,

Package Sidebar

Install

npm i char-avatar

Weekly Downloads

10

Version

1.0.4

License

Apache-2.0

Unpacked Size

17.6 kB

Total Files

7

Last publish

Collaborators

  • monvechen