0.2.0 • Published 6 years ago

rc-texty v0.2.0

Weekly downloads
1,515
License
MIT
Repository
github
Last release
6 years ago

rc-texty


React TextyAnim Component

NPM version build status codecov npm download

Example

http://localhost:8010/examples/

online example: http://react-component.github.io/texty/

install

rc-texty

Usage

var TextyAnim = require('rc-texty');
var React = require('react');
React.render(<TextyAnim>text</TextyAnim>, container);

API

props

nametypedefaultdescription
classNamestringnullclass name.
prefixClsstringtextyprefix class
typestringtopanimation style, 'left' | 'right' | 'top' | 'bottom' |'alpha' | 'scale' | 'scaleX' | 'scaleBig' | 'scaleY' | 'mask-bottom' | 'mask-top' | 'flash' | 'bounce' | 'swing' | 'swing-y' | 'swing-rotate'.
modestringsmoothanimate sport mode. 'smooth' | 'reverse' | 'random' | 'sync'
durationnumber | func450Except for special animation 'flash' | 'bounce' | 'swing' | 'swing-y' | 'swing-rotate'. one text animation duration
intervalnumber | func50animation interval, is function: (e: { key: string }) => number. Key is split text plus sequence(text-1).
delaynumber0animation overall delay.
splitfuncnullchildren split, return string

Inherit TweenOneGroup

nametypedefaultdescription
appearbooleantruewhether support appear anim
enterobject / array / funcnullenter anim twee-one data. when array is tween-one timeline, func refer to queue-anim
leaveobject / array / funcnullleave anim twee-one data. when array is tween-one timeline, func refer to queue-anim
onEndfunc-one animation end callback
animatingClassNamearray['tween-one-entering', 'tween-one-leaving']className to every element of animating
exclusivebooleanfalseWhether to allow a new animate to execute immediately when switching. enter => leave: execute immediately leave
componentReact.Element/Stringdivcomponent tag
componentPropsobject-component tag props

License

rc-texty is released under the MIT license.