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

1.1.2 • Public • Published

react-initials-avatar

🙋‍♂️ Made by @abhijithvijayan

Donate: PayPal, Patreon

Buy Me a Coffee


❤️ it? ⭐️ it on GitHub or Tweet about it.

Table of Contents

Installation

Ensure you have Node.js 10 or later installed. Then run the following:

# via npm
npm install react-initials-avatar

# or yarn
yarn add react-initials-avatar

Usage

import React from 'react';
 
import InitialsAvatar from 'react-initials-avatar';
import 'react-initials-avatar/lib/ReactInitialsAvatar.css';
 
function App() {
    return (
      <>
        <InitialsAvatar name="Sherlock Holmes" />
      </>
    );
}

API

name

Type: string

Name for Initials generation

className

Type: string

Default: initial-avatar (with basic styles if css file is imported)

class name for the root div element.

Issues

Looking to contribute? Look for the Good First Issue label.

🐛 Bugs

Please file an issue here for bugs, missing documentation, or unexpected behavior.

See Bugs

Linting & TypeScript Config

License

MIT © Abhijith Vijayan

Package Sidebar

Install

npm i react-initials-avatar

Weekly Downloads

1,302

Version

1.1.2

License

MIT

Unpacked Size

12.4 kB

Total Files

8

Last publish

Collaborators

  • abhijithvijayan