1.0.6 • Published 2 years ago
react-username-avatar v1.0.6
Getting Started with React username avatar
To begin, you'll need to install react-username-avatar
How to Use
npm i react-username-avatarExample
import ReactAvatar from "react-username-avatar";
const App = () => {
return (
<div>
<ReactAvatar
fname="user"
lname="Name"
backgroundcolour="red"
textcolour="white"
image="https://fakeimg.pl/300/"
size="100"
fontsize="50"
borderradius="2"
borderColor="black"
className="my-class"
/>
</div>
);
}
export default App;Usage
fnameis used to pass name of user firts name. TYPE:stringlnameis used to pass name of user last name. TYPE:stringbackgroundcolouris used to change background color. TYPE:stringtextcolouris used to change text color. TYPE:stringimageis used to show user image. TYPE:stringsizeis used to change avatar size. TYPE:stringfontsizeis used to change font size of avatar. TYPE:stringborderradiusis used for border radius in avatar. TYPE:numberborderColoris used to change border color. TYPE:stringclassNameis used to add own class. TYPE:string