1.0.2 • Published 3 years ago

react-gravatar-or-initials v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

react-gravatar-or-initials

React component to display user avatars from Gravatar or initials from UI-Avatars.com

NPM JavaScript Style Guide

Install

npm install --save react-gravatar-or-initials

Usage

View example here

import React, { Component } from 'react'

import Avatar from 'react-gravatar-or-initials'
import 'react-gravatar-or-initials/dist/index.css'

class Example extends Component {
  render() {
    return (
      <Avatar
        email='hello@snehanshu.com'
        name='Snehanshu Phukon'
        size={120}
        fontSize={0.5}
        initialsLength={2}
        color='8b5d5d'
        bgColor='f0e9e9'
        uppercase
      />
    )
  }
}

View example here

License

MIT © pSnehanshu