@myway42/sparkly
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

Published on webcomponents.org NPM Version

<sparkly-view>

Easily start.

<sparkly-view>hello world</sparkly-view>

Live Demo

Description

This is a custom element that allows you to add sparkly animation to the textbuttonimg and so on.

Installation

npm install @myway42/sparkly

then 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>

Usage

<sparkly-view canclick="true" color="red" minsize="12" maxsize="24">hello world</sparkly-view>

Attributes

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

Package Sidebar

Install

npm i @myway42/sparkly

Weekly Downloads

8

Version

1.0.3

License

MIT

Unpacked Size

12.4 kB

Total Files

7

Last publish

Collaborators

  • jiangzq-npm