logo-loader
v0.1.3
Published
Web component to seamlessly create a loader from your logo image or icon
Downloads
120
Maintainers
Readme
logo-loader
Web component to seamlessly create a loader from your logo image or icon
Installation
CDN / Script tag
<head>
<script type="module" src="https://cdn.jsdelivr.net/npm/[email protected]/dist/logoLoader.esm.min.js"></script>
</head>or
NPM
npm i logo-loaderthen
// main.js|ts
import 'logo-loader'Demo
Default:
Pulse mode:
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.svg">
</logo-loader>
</body>Attributes
mode
Defines the animation style ("default" or "pulse")
<logo-loader src="..." mode="pulse"></logo-loader>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))
