0.0.1 • Published 9 months ago
logo-loader v0.0.1
logo-loader
Web component to seamlessly create a loader from your logo image or icon
Installation
<head>
<script type="module" src="https://cdn.jsdelivr.net/npm/logo-loader@0.0.1/dist/logoLoader.esm.min.js"></script>
</head>
or
// javascript file
import 'logo-loader'
Demo
Usage
<body>
<logo-loader src="my-logo.png"></logo-loader>
</body>
or pass the image/icon as a slot:
<body>
<logo-loader>
<img src="my-logo.png">
</logo-loader>
</body>
Attributes
pause
Pauses the animation:
<logo-loader src="..." pause></logo-loader>
or
<logo-loader src="..." pause="true"></logo-loader>
width & height (works only when using the src attribute)
Sets the logo size:
<logo-loader src="..." width="150" height="150"></logo-loader>
or
<logo-loader src="..." width="5rem" height="5rem"></logo-loader>
Note
- You must apply the component in a single colored background in order for it correctly animate
- You might find some distortions if the parent background has an alpha channel (e.g.
rgba(x, x, x, 0.3)
)
0.0.1
9 months ago