# sapataaars

> React component for avataaars, with SAP additions

Latest version **1.2.0** (published 2020-08-02) · MIT license · 0 weekly downloads

## Install

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

## 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.2.0 |
| Published | 2020-08-02 |
| First published | 2020-07-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 1.7 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Jeffrey Leung |
| Maintainers | jleung51 |
| Keywords | react, avatar |

## Links

- npm: https://www.npmjs.com/package/sapataaars
- Repository: https://github.com/jleung51/sapataaars
- Homepage: https://github.com/jleung51/sapataaars#readme
- Issues: https://github.com/jleung51/sapataaars/issues
- npm.io page: https://npm.io/package/sapataaars

## Dependencies (5)

- [react](https://npm.io/package/react.md) ^16.0.0
- [lodash](https://npm.io/package/lodash.md) >=4.17.11
- [webpack](https://npm.io/package/webpack.md) ^4.44.0
- [prop-types](https://npm.io/package/prop-types.md) ^15.6.0
- [babel-loader](https://npm.io/package/babel-loader.md) ^8.1.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

- 1.2.0 (latest) — 2020-08-02
- 1.1.2 — 2020-08-02
- 1.1.1 — 2020-08-02
- 1.1.0 — 2020-07-27
- 1.0.0 — 2020-07-27

## README

# SAPataaars: Avataaars with an SAP Twist

![Licence: MIT](https://img.shields.io/github/license/jleung51/sapataaars)

React component derived from the [Avataaars package](https://github.com/fangpenlin/avataaars). Built on TypeScript, bundled with Webpack, and published on NPM.

This modification of [Avataaars 1.2.1](https://www.npmjs.com/package/avataaars/v/1.2.1) includes new SAP-branded clothing and hat options.

<p align="center"><img src='sapataaars-example.png?raw=true' style='width: 300px; height: 300px;' /></p>

**Install** this package from NPM [here](https://www.npmjs.com/package/sapataaars).

___

## SAP Clothing and Hats

The available clothes are:
* SapBestRunHoodie
* SapCrewneckShirt
* SapIxpBlazer

The available tops (hats) are:
* SapBaseballCap
* SapCowboyHat
* SapToque

All other avatar customizations from [Avataaars 1.2.1](https://www.npmjs.com/package/avataaars/v/1.2.1) are also available. To explore non-SAPataaar options, see [Avataaars Generator](https://getavataaars.com/).

## Credits

The original [Avataaars Generator](https://getavataaars.com/) is developed by [Fang-Pen Lin](https://twitter.com/fangpenlin), and was based on the Sketch library [Avataaars](https://avataaars.com/) designed by [Pablo Stanley](https://twitter.com/pablostanley).

## Usage

A working React project is required as a base.

Install the package:
```shell
yarn add sapataaars

// or

npm install sapataaars --save
```

In the React project, import the SAPataaar component with the preferred character customization:
```jsx
import * as React from 'react'
import Avatar from 'sapataaars'

export default class MyComponent extends React.Component {
  render () {
    return
      <div>
        Your avatar:
        <Avatar
          style={{width: '100px', height: '100px'}}
          avatarStyle='Circle'
          topType='SapBaseballCap'
          accessoriesType='Prescription02'
          hairColor='BrownDark'
          facialHairType='Blank'
          clotheType='SapBestRunHoodie'
          clotheColor='PastelBlue'
          eyeType='Happy'
          eyebrowType='Default'
          mouthType='Smile'
          skinColor='Light'
        />
      </div>
  }
}
```

## Building the Component for NPM Release

TypeScript and Webpack are both required to build the component.

Install all dependencies:
```shell
npm install
```

Update `package.json` with the version number to publish, and optionally create a [Git tag](https://git-scm.com/book/en/v2/Git-Basics-Tagging) for tracking.

Create the package to publish:
```shell
npm run build
```

Finally, publish the package to NPM:
```shell
npm publish
```

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