npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

rc-banner-anim-strict-mode

v2.4.7

Published

banner-anim animation component for react

Downloads

3

Readme

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 |