1.0.1 • Published 3 years ago

icon-fly-animate v1.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

About icon-fly-react

An animation method to make a icon fly, for react

Install

npm install icon-fly-react --save

Usage

import iconFly from 'icon-fly-react';

iconFly({
  duration: 500,
  delay: 50,
  start: { x: 200, y: 300},
  end: { x: 10, y: 10},
  icon: 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.lovepik.com%2Felement%2F40067%2F7780.png_300.png&refer=http%3A%2F%2Fimg.lovepik.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1618061392&t=68adfafdeeb423801d03abecd31bb14d'
})

Options

property 参数description 描述require 是否必须type 类型default 默认
durationduration time 持续时间FALSEnumber500
iconNumicon numberFALSEnumber6
delaydelay time 延迟时间FALSEnumber50
startstart position 开始位置FALSEobject{ x: 50, y: 50 }
endend position 结束位置FALSEobject{ x: 0, y: 0 }
widthwidth 宽FALSEnumber | string
heightheight 高FALSEnumber | string
iconicon url 图片地址TRUEstring
onCompletecallback at the end 完成后的回调FALSEfunction
classNameclassName 类名FALSEstring'animate-icon'