1.0.2 • Published 5 years ago
avatar-component-smak v1.0.2
web-component-avatar
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-smakWith all properties
![]()
With src and name properties, text position default is left
![]()
With only src property
![]()
With no properties
![]()
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>