Easily start.
<sparkly-view>hello world</sparkly-view>This is a custom element that allows you to add sparkly animation to the text、button、img and so on.
npm install @myway42/sparklythen import
import '@myway42/sparkly'Or
import Sparkly from '@myway42/sparkly/dist/component.js'
// same as previously
Sparkly.register()
// registering as a different tag-name:
Sparkly.register('nice-sparkly')Or grab from unpkg.com CDN:
<script src="https://unpkg.com/@myway42/sparkly" type="module"></script><sparkly-view canclick="true" color="red" minsize="12" maxsize="24">hello world</sparkly-view>| Name | type | default | Description |
|---|---|---|---|
| canclick | boolean | false | Whether the Sparkly can be click to hide/show |
| color | string | #FFC700 | Sparkle color |
| minsize | number | 10 | Sparkle min size |
| maxsize | number | 20 | Sparkle max size |