1.0.4 • Published 5 years ago

react-marquee-text-component v1.0.4

Weekly downloads
20
License
MIT
Repository
github
Last release
5 years ago

react-marquee-text-component

npm NPM npm GitHub stars

基于react的跑马灯文字效果。

Demo

Demo here

Installation

npm install react-marquee-text-component --save

Usage

import React from 'react';
import MarqueeText from 'react-marquee-text-component';

class Demo extends React.Component {
  render() {
    const text = '这是一段滚动轮播的文字';
    return (
      <MarqueeText text={text}/>
    )
  }
}

API

PropTypeDefaultDescription
durationNumber15Animation Duration
repeatNumber2Number of repeat the Slot (It's important for to short content)
pausedBooleanfalseThe property specifies whether the animation is running or paused
styleObjectStyle of marquee text
classNameStringThe class name of the marquee text

License

MIT