react-simple-marquee
TypeScript icon, indicating that this package has built-in type declarations

1.3.2 • Public • Published

react-simple-marquee

A very simple Marquee component created by using CSS animation and React

Table of Contents

Demo

Link to demo: https://react-simple-marquee.surge.sh

Installation

npm i react-simple-marquee --save

Usage

Import Marquee component into your React component

Using React Hooks

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"));

Using React Class Component

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"));

Readme

Keywords

Package Sidebar

Install

npm i react-simple-marquee

Weekly Downloads

28

Version

1.3.2

License

MIT

Unpacked Size

22.7 kB

Total Files

14

Last publish

Collaborators

  • 2saki
  • masonwongcs