# char-avatar

> create a character avatar

Latest version **1.0.4** (published 2022-04-12) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install char-avatar
pnpm add char-avatar
yarn add char-avatar
bun add char-avatar
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2022-04-12 |
| First published | 2022-03-02 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 17.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Monve |
| Maintainers | monvechen |
| Keywords | character, avatar, string, react, color |

## Links

- npm: https://www.npmjs.com/package/char-avatar
- Repository: https://github.com/MonveChen/char-avatar
- Homepage: https://github.com/MonveChen/char-avatar#readme
- Issues: https://github.com/MonveChen/char-avatar/issues
- npm.io page: https://npm.io/package/char-avatar

## Dependencies (2)

- [react](https://npm.io/package/react.md) ^17.0.2
- [react-string-avatar](https://npm.io/package/react-string-avatar.md) ^1.2.2

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.4 (latest) — 2022-04-12
- 1.0.3 — 2022-03-02
- 1.0.2 — 2022-03-02
- 1.0.1 — 2022-03-02

## README

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

#### Usage

```js
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,

---
_Source: https://npm.io/package/char-avatar · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
