rc-banner-anim
TypeScript icon, indicating that this package has built-in type declarations

2.4.5 • Public • Published

rc-banner-anim


React BannerAnim Component

NPM version build status Test coverage node version npm download

Browser Support

IE Chrome Firefox Opera Safari
IE 10+ ✔ Chrome 31.0+ ✔ Firefox 31.0+ ✔ Opera 30.0+ ✔ Safari 7.0+ ✔

Development

npm install
npm start

Example

http://localhost:8012/examples/

online example: http://react-component.github.io/banner-anim/

install

rc-banner-anim

Usage

var BannerAnim = require('rc-banner-anim');
var React = require('react');
const { Element } = BannerAnim;
const BgElement = Element.BgElement;
React.render(<BannerAnim>
  <Element key="a">
    <BGElement key="bg" style={{ background: 'url(img)' }}/>
    <TweenOne key='0'>test text</TweenOne>
  </Element>
  <Element key="b">
    <BGElement key="bg" style={{ background: 'url(img)' }}/>
    <TweenOne key='0'>test text</TweenOne>
  </Element>
</BannerAnim>, container);

API

BannerAnim

`ref` control jump: <BannerAnim ref={(c) => { this.banner = c; }}/>

prev: this.banner.prev();

next: this.banner.next();

jump: this.banner.slickGoTo(number); number from 0;
name type default description
type string / array All animType Provide across, vertical, acrossOverlay, verticalOverlay, (gridBar, grid) => duration is a single block of animation time, video bg no use
duration number 450 Single switch time.
delay number 0 switch delay.
ease string easeInOutQuad easing.
initShow number 0 start show
arrow boolean true Arrow is children, this is null and void. else is default arrow
thumb boolean true ^
autoPlay boolean false auto play
autoPlaySpeed number 5000 auto play delay
autoPlayEffect boolean true auto play when mouse leave
onChange func - onChange(before or after, currentShowInt)
prefixCls string - user class
children react.component - Element(must), Arrow, Thumb
sync boolean false Element the children and Element the same time animation
dragPlay boolean true drag play next or prev
component string 'div' component tag

Element

children is TweenOne, animation type must from;

name type default description
leaveChildHide boolean false children leave switch animation. Replace the hideProps.
sync boolean false children and Element the same time animation
prefixCls string - user class
followParallax object null follow mouse anim
component string 'div' component tag
componentProps object null component is React.Element, component tag props, not add style

followParallax is object

name type default description
delay number null open followParallax delay
data array null content: { key: string, value: number, type: array or string, bgPosition: string }; key: children key; value: animation interval value, example: value is 20 => [left: -20, center: 0 , right: 20] ; type: style or x y, bgPosition: if type is backgroundPosition, this is bg default position, else is invalid.
ease string easeOutQuad animate ease. refer
minMove number null ease.easeInOutQuad(start, minMove, 1, end); The mouse to move once, the minimum point of moving graphics, a second to reach the position of the mouse.

Element.BgElement

name type default description
className string - className
scrollParallax object null { y: 100 }, from bottom to top of browser, element leave display area y is 100
videoResize boolean true children is video, video follow window resize
component string 'div' component tag
componentProps object null component is React.Element, component tag props, not add style

Arrow

name type default description
arrowType 'prev' | 'next' - arrow type
prefixCls string - user class
component string / React.Element div component tag
componentProps object null component is React.Element, component tag props, not add style

Thumb

name type default description
children React.Element - must
prefixCls string - user class
component string / React.Element div component tag
componentProps object null component is React.Element, component tag props, not add style

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
2.4.5555latest

Version History

VersionDownloads (Last 7 Days)Published
2.4.5555
2.4.40
2.4.344
2.4.21
2.4.11
2.4.04
2.3.05
2.2.92
2.2.82
2.2.71
2.2.61
2.2.52
2.2.40
2.2.30
2.2.22
2.2.15
2.2.04
2.1.25
2.1.10
2.1.02
2.0.82
2.0.71
2.0.60
2.0.51
2.0.40
2.0.30
2.0.20
2.0.11
2.0.00
1.0.2122
1.0.10
1.0.09
0.5.1612
0.5.141
0.5.130
0.5.121
0.5.110
0.5.100
0.5.90
0.5.80
0.5.70
0.5.60
0.5.51
0.5.41
0.5.30
0.5.22
0.5.10
0.5.01
0.4.10
0.4.00
0.3.10
0.3.00
0.2.141
0.2.130
0.2.120
0.2.110
0.2.100
0.2.92
0.2.80
0.2.70
0.2.60
0.2.50
0.2.42
0.2.30
0.2.20
0.2.10
0.2.00
0.1.01

Package Sidebar

Install

npm i rc-banner-anim

Weekly Downloads

797

Version

2.4.5

License

none

Unpacked Size

871 kB

Total Files

33

Last publish

Collaborators

  • jljsj33