# nice-react-ticker

> Nicest react ticker in town

Latest version **2.1.0** (published 2022-08-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install nice-react-ticker
pnpm add nice-react-ticker
yarn add nice-react-ticker
bun add nice-react-ticker
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.1.0 |
| Published | 2022-08-27 |
| First published | 2020-02-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=10 |
| Dependencies | 0 |
| Unpacked size | 39.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 31 |
| Author | jeremyrajan |
| Maintainers | jeremyrajan |

## Links

- npm: https://www.npmjs.com/package/nice-react-ticker
- Repository: https://github.com/jeremyrajan/nice-react-ticker
- Homepage: https://github.com/jeremyrajan/nice-react-ticker#readme
- Issues: https://github.com/jeremyrajan/nice-react-ticker/issues
- npm.io page: https://npm.io/package/nice-react-ticker

## Recent versions

- 2.1.0 (latest) — 2022-08-27
- 2.0.0 — 2021-12-26
- 1.1.0 — 2020-02-22
- 1.0.1 — 2020-02-22
- 1.0.0 — 2020-02-22

## README

# nice-react-ticker

> Nicest react ticker in town

[![NPM](https://img.shields.io/npm/v/nice-react-ticker.svg)](https://www.npmjs.com/package/nice-react-ticker) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
[![Build Status](https://travis-ci.com/jeremyrajan/nice-react-ticker.svg?branch=master)](https://travis-ci.com/jeremyrajan/nice-react-ticker)

## Install

```bash
npm install --save nice-react-ticker
```

**Demo**: https://jeremyrajan.github.io/nice-react-ticker/

## Usage

The library provides with 2 kinds of tickers:

1. Financial Ticker: Heavily inspired from https://www.tradingview.com/
2. News Ticker: Lightweight news ticker

You can refer to the demo below for the props and refer to `/example` folder for implementation.

```tsx
import React, { Component } from 'react'
import Ticker, { FinancialTicker, NewsTicker } from 'nice-react-ticker';
import icon from './news-icon.png'; // add images, please make sure they can be set as src


export default class App extends Component {
  render() {
    return (
      <div>
        <Ticker>
          <FinancialTicker id="1" change={true} symbol="S&P 500" lastPrice="3372.2" percentage="0.38%" currentPrice="12.9" />
          <FinancialTicker id="2" change={true} symbol="AAPL" lastPrice="3372.2" percentage="0.38%" currentPrice="12.9" />
          <FinancialTicker id="3" change={true} symbol="GOOG" lastPrice="3372.2" percentage="0.38%" currentPrice="12.9" />
          <FinancialTicker id="4" change={false} symbol="S&P 500" lastPrice="3372.2" percentage="0.38%" currentPrice="12.9" />
          <FinancialTicker id="5" change={false} symbol="S&P 500" lastPrice="3372.2" percentage="0.38%" currentPrice="12.9" />
          <FinancialTicker id="6" change={false} symbol="S&P 500" lastPrice="3372.2" percentage="0.38%" currentPrice="12.9" />
        </Ticker>

        <div className="newsticker">
          <Ticker isNewsTicker={true}> {// helps with setting up animation}
            <NewsTicker id="1" icon={icon} title="Blue passports to be issued to Brits for the first time in decades next month decades next month decades next month decades next month" url=" https://metro.co.uk/2020/02/22/blue-passports-issued-brits-first-time-decades-next-months-12281012/?ito=newsnow-feed" meta="11:10:20"  />
            <NewsTicker id="2" icon={icon} title="Blue passports to be issued to Brits for the first time in decades next month" url=" https://metro.co.uk/2020/02/22/blue-passports-issued-brits-first-time-decades-next-months-12281012/?ito=newsnow-feed" meta="11:10:20" />
            <NewsTicker id="3" icon={icon} title="Blue passports to be issued to Brits for the first time in decades next month" url=" https://metro.co.uk/2020/02/22/blue-passports-issued-brits-first-time-decades-next-months-12281012/?ito=newsnow-feed" meta="11:10:20" />
            <NewsTicker id="4" icon={icon} title="Blue passports to be issued to Brits for the first time in decades next month" url=" https://metro.co.uk/2020/02/22/blue-passports-issued-brits-first-time-decades-next-months-12281012/?ito=newsnow-feed" meta="11:10:20" />
            <NewsTicker id="5" icon={icon} title="Blue passports to be issued to Brits for the first time in decades next month" url=" https://metro.co.uk/2020/02/22/blue-passports-issued-brits-first-time-decades-next-months-12281012/?ito=newsnow-feed" meta="11:10:20" />
            <NewsTicker id="6" icon={icon} title="Blue passports to be issued to Brits for the first time in decades next month" url=" https://metro.co.uk/2020/02/22/blue-passports-issued-brits-first-time-decades-next-months-12281012/?ito=newsnow-feed" meta="11:10:20" />
          </Ticker>
        </div>
      </div>
    )
  }
}

```

### `Ticker` Options

1. `slideSpeed`: Speed in seconds for the animation
2. `isNewsTicker`: Toggle between finance and news ticker

## License

MIT © [jeremyrajan](https://github.com/jeremyrajan)

---
_Source: https://npm.io/package/nice-react-ticker · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
