1.0.2 • Published 4 years ago

avatar-component-smak v1.0.2

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

web-component-avatar

npm version Published on webcomponents.org

Web Component using plain javascript for avatar with name

    <avatar-comp
      src="./avatar.jpeg"
      avatarName="Sachin Tendulkar"
      textPosition="right"
    />

All properties are optional.

Install From NPM

npm i avatar-component-smak

With all properties

alt text

With src and name properties, text position default is left

alt text

With only src property

alt text

With no properties

alt text

SAMPLE HTML also you can find in elements folder elements/index.html

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <avatar-comp
      src="./assets/avatar.jpeg"
      avatarName="Sachin Tendulkar"
      textPosition="right"
    />
    <script src="./../dist/AvatarComponent.js"></script>
  </body>
</html>