fy-shop-move

1.0.2 • Public • Published

fy-shop-move

NPM version NPM Weekly Downloads License

A simple shopping cart animation effect

Install with npm, or Yarn:

# via npm
npm install fy-shop-move --save

# or Yarn (note that it will automatically save the package to your `dependencies` in `package.json`)
yarn add fy-shop-move

Usage

    import MoveFactory from 'fy-shop-move';
    import 'fy-shop-move/style';

    MoveFactory.create({
        clickEle: document.querySelector('.click'),
        storeEle: document.querySelector('.store'),
        moveHTML: `<div class="plus">+</div>`,
        moveEleSize: 30,
        moveEndCallback: () => {
            console.log('move end.')
        }
    })

Params

Property Type Required? Description
clickEle HTMLElement Elements of starting animation
storeEle HTMLElement Elements of ending animation
moveHTML String Animation element html string
moveEleSize Number Animation element size, width and height are consistent; Unit: px
moveEndCallback Function Animation end callback function

Example

demo

Readme

Keywords

Package Sidebar

Install

npm i fy-shop-move

Weekly Downloads

1

Version

1.0.2

License

MIT

Unpacked Size

10.7 kB

Total Files

10

Last publish

Collaborators

  • fychonger