react-initials-avatar
v1.1.2
Published
Minimal initials avatar component for React
Downloads
4,361
Maintainers
Readme
❤️ 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.
Linting & TypeScript Config
- Shared Eslint & Prettier Configuration -
@abhijithvijayan/eslint-config
- Shared TypeScript Configuration -
@abhijithvijayan/tsconfig
License
MIT © Abhijith Vijayan