React CSS Marquee
Bringing back that sweet scrolling HTML Marquee element. In React with CSS @keyframes for animations. Uses hooks to detect window size so React >16.8.
How to
Install
yarn add react-css-marquee
Use
import Marquee from 'react-css-marquee'
...
<Marquee text="Your scrolling text here..." />
Styling
Pass inline styles with the styles
prop or use the CSS default classes react-marquee__container
and react-marquee__text
. You can also pass your own CSS namespace.
Props
Prop | Example |
---|
text: string | Your marquee text |
direction: string | left | right |
size: number | 200 |
styles: object | Inline CSS |
speed: number | 5 |
namespace: string | Pass own CSS namespace |