avatar-component-smak

1.0.2 • Public • Published

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>

Package Sidebar

Install

npm i avatar-component-smak

Weekly Downloads

1

Version

1.0.2

License

MIT

Unpacked Size

171 kB

Total Files

13

Last publish

Collaborators

  • shaileshmakorg