Skip to content

niborb/react-native-gravatar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React Native Gravatar component

npm version npm downloads

React Native Gravatar is a simple component that loads the avatar with an option to mask it with a circle, rounded or square shape.

Installation

npm install react-native-avatar-gravatar

Usage

import Gravatar from 'react-native-avatar-gravatar';

class Application extends Component {  
  render () {
    return (
      <Gravatar emailAddress="[email protected]" size={300} mask="circle" />
    )
  }
})

Properties

Basic

Prop Default Type Description
emailAddress '' string Email address for gravatar, if not provided uses default image for gravatar
size 60 number Size for the gravatar image
mask 'circle' number Mask for the gravatar image. One of - 'circle', 'square', 'rounded'
defaultImage 'retro' string default image if no email address. One of - '404', 'mm', 'identicon', 'monsterid', 'wavatar', 'retro', 'robohash', 'blank'
resizeMode 'contain' string resizeMode for the gravatar image

About

React Native Gravatar component

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •