1.0.11 • Published 3 years ago

smak-avatar v1.0.11

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

smak-avatar

React avatar component liabrary

NPM JavaScript Style Guide JavaScript Style Guide

Install

npm install --save smak-avatar

Usage

import React, { Component } from 'react'

import Avatar from 'smak-avatar'

class Example extends Component {
  render() {
    return <Avatar />
  }
}

react-avatar-library

React component library for Avatar

<Avatar
  src='http://www.worldbiography.info/wp-content/uploads/2019/12/sachin.jpg'
  name='Sachin Tendulkar'
  width={50}
  position='right'
/>

All properties are optional.

Install From NPM

npm i smak-avatar

With all properties

alt text

<Avatar
  src='http://www.worldbiography.info/wp-content/uploads/2019/12/sachin.jpg'
  name='Sachin Tendulkar'
  width={50}
  position='right'
/>

With src and name properties, text position default is left

alt text

<Avatar
  src='http://www.worldbiography.info/wp-content/uploads/2019/12/sachin.jpg'
  name='Sachin Tendulkar'
/>

With only src property

alt text

<Avatar src='http://www.worldbiography.info/wp-content/uploads/2019/12/sachin.jpg' />

With no properties

alt text

<Avatar />

With initials

alt text

<Avatar initials='SM' />

License

MIT © ShaileshMak