0.0.10 • Published 6 years ago

react-users-avatar v0.0.10

Weekly downloads
13
License
ISC
Repository
github
Last release
6 years ago

React Users Avatar

Install

npm install react-users-avatar --save

Demo

Usage

React users avatar example with image and border
import UserAvatar from 'react-users-avatar';

class ReactUsersAvathar extends Component {
    render() {
        return (
            <UserAvatar 
                imgUrl="https://cdn2.iconfinder.com/data/icons/avatar-2/512/oscar_boy-512.png"
                avatharBgColor="#858aa0"
                avatharTextColor="#fff"
                name="full name"
                border="5px solid #474d56"
                ifBorder
                imgHeight="150px"
                imgWidth="150px"
            />
        );
    }
}
React users avatar example with out image and with out border
import UserAvatar from 'react-users-avatar';

class ReactUsersAvathar extends Component {
    render() {
        return (
            <UserAvatar 
                  avatharBgColor="#858aa0"
                  avatharTextColor="#fff"
                  name="Thamu"
                  border="5px solid #474d56"
                  ifBorder={false}
                  imgHeight="150px"
                  imgWidth="150px"
            />
        );
    }
}
React users avatar example with out image and with border
import UserAvatar from 'react-users-avatar';

class ReactUsersAvathar extends Component {
    render() {
        return (
            <UserAvatar 
                  avatharBgColor="red"
                  avatharTextColor="#fff"
                  name="Nithi"
                  border="5px solid #474d56"
                  ifBorder
                  imgHeight="150px"
                  imgWidth="150px"
            />
        );
    }
}
React users avatar example with out image, with border and with out background
import UserAvatar from 'react-users-avatar';

class ReactUsersAvathar extends Component {
    render() {
        return (
            <UserAvatar 
                  avatharBgColor="#fff"
                  avatharTextColor="green"
                  name="Thamu Nithi"
                  border="5px solid #474d56"
                  ifBorder
                  imgHeight="150px"
                  imgWidth="150px"
            />
        );
    }
}

PROPTYPES

PropTypeDefault
imgUrlString''
avatharBgColorString#858aa0
avatharTextColorString#fff
nameStringavatar
borderString5px solid #474d56
ifBorderBooleantrue
imgHeightString150px
imgWidthString150px

react-users-avatar

0.0.10

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.1

6 years ago