# emojitars

> An avatar libraray for your next react project.

Latest version **0.1.0** (published 2023-07-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install emojitars
pnpm add emojitars
yarn add emojitars
bun add emojitars
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2023-07-17 |
| First published | 2023-07-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 1.5 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Ashish Khare |
| Maintainers | hugekontrast |
| Keywords | avatar, react |

## Links

- npm: https://www.npmjs.com/package/emojitars
- Repository: https://github.com/ashishk1331/emojitar
- Homepage: https://emojitars.super.site/
- Issues: https://github.com/ashishk1331/emojitar/issues
- npm.io page: https://npm.io/package/emojitars

## Dependencies (2)

- [react](https://npm.io/package/react.md) ^18.2.0
- [react-dom](https://npm.io/package/react-dom.md) ^18.2.0

## 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

- 0.1.0 (latest) — 2023-07-17

## README

# Emojitar

An avatar libraray for your next react project. This library is inspired from [Avvvatars](https://github.com/nusu/avvvatars) and emojis are taken from [Phosphor Library](https://github.com/phosphor-icons)

<img src="banner.png" alt="Emojitar banner image">

[Visit the site](https://emojitars.super.site/) made with super.so

### Features

-   Generate unique avatars for your users
-   Highly customisable
-   0 dependencies
-   Switch between initials or emojis

### Installation

Install it using you favourite packadge manager.

```bash
npm install emojitar
```

### Get started

Import the library and use the component

```jsx
import { Emojitar as Avatar } from "emojitar";

export default function (props) {
	return <Avatar value="Ashish Khare" displayValue="ak" />;
}
```

### Properties

1. `value : string` <br />
   It is a required field and avatar is generated on the basis of this property.

```jsx
<Avatar value="flangdev3000@gmail.com" />
```

2. `displayValue?: string` <br />
   It is the text that will be displayed instead of the value property in the avatar.

```jsx
<Avatar value="flangdev3000@gmail.com" displayValue="AK" />
```

3. `emoji ?: none` <br />
   Just specify the prop emoji to display emoji instead of initials.

```jsx
<Avatar value="flangdev3000@gmail.com" emoji />
```

4. `size ?: (number | 32)` <br />
   Specify the size of the avatar. Or it is set to 32 by default.

```jsx
<Avatar value="flangdev3000@gmail.com" size={36} />
```

5. `radius ?: number` <br />
   Specify the radius of the avatar, else it defaults to full rounded corners.

```jsx
<Avatar value="flangdev3000@gmail.com" radius={6} />
```

6. `shadow ?: none` <br />
   This property applies a subtle shadow beneath the avatar.

```jsx
<Avatar value="flangdev3000@gmail.com" shadow />
```

7. `border ?: none` <br />
   Apply this property to activate border on the avatar.

```jsx
<Avatar value="flangdev3000@gmail.com" border />
```

8. `borderSize ?: (number | 2)` <br />
   Set width of border. Defaults to 2. It is important to also pass border prop while using borderSize prop.

```jsx
<Avatar value="flangdev3000@gmail.com" border borderSize={6} />
```

9. `borderColor ?: string` <br />
   Accepts a string of valid CSS color code. Or else default to predefined color set.

```jsx
<Avatar value="flangdev3000@gmail.com" border borderColor="#06dea6" />
```

### Last Words

Hope you enjoy this library!

### License

MIT

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