Skip to content

pubdreamcc/react-marquee-text-component

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Prop Type Default Description
duration Number 15 Animation Duration
repeat Number 2 Number of repeat the Slot (It's important for to short content)
paused Boolean false The property specifies whether the animation is running or paused
style Object Style of marquee text
className String The class name of the marquee text

License

MIT