smak-avatar

React avatar component liabrary

Usage no npm install needed!

<script type="module">
  import smakAvatar from 'https://cdn.skypack.dev/smak-avatar';
</script>

README

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