react-simple-marquee
Version:
Marquee build with React and CSS animation
70 lines (52 loc) • 1.25 kB
Markdown
A very simple Marquee component created by using CSS animation and React
- [Installation](
- [Usage](

Link to demo: https://react-simple-marquee.surge.sh
```sh
npm i react-simple-marquee --save
```
Import Marquee component into your React component
```jsx
import * as React from "react";
import ReactDOM from "react-dom";
import Marquee from "react-simple-marquee";
const App = () => (
<Marquee
speed={2} // Speed of the marquee (Optional)
style={{
height: 30 // Your own styling (Optional)
}}
>
Your text here
</Marquee>
);
ReactDOM.render(<App />, document.getElementById("root"));
```
```jsx
import * as React from "react";
import ReactDOM from "react-dom";
import Marquee from "react-simple-marquee";
class App extends React.Component {
render() {
return (
<Marquee
speed={2} // Speed of the marquee (Optional)
style={{
height: 30 // Your own styling (Optional)
}}
>
Your text here
</Marquee>
);
}
}
ReactDOM.render(<App />, document.getElementById("root"));
```