1.0.7 • Published 8 months ago

@vickjoe/react-news-ticker v1.0.7

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months ago

React News Ticker

A sleek, customizable news ticker for React applications. Display news, announcements, or any other text with options for outline color, background color, auto-scroll, and much more.

Table of Contents

  1. Installation
  2. Usage
  3. Props
  4. Examples
  5. Contributing
  6. License

Installation

To install this package, run:

npm install react-news-ticker

Usage

Import NewsTicker in your React component:

import NewsTicker from 'react-news-ticker';

Then you can use the <NewsTicker /> component within your React components.

Props

Here are the props you can pass to the <NewsTicker /> component:

PropTypeDefaultDescription
outlineColorstringblackColor of the ticker's outline
backgroundColorstring#333Background color of the ticker
textColorstring#FFFText color of the ticker
xColorstringsame as textColorColor of the 'x' close button
isAutoScrollbooleantrueWhether the ticker text should auto-scroll
startTimeDatenullDate and time the ticker should start displaying
stopTimeDatenullDate and time the ticker should stop displaying
contentstringDefault News Ticker ContentThe text content to display in the ticker
scrollSpeedstring80sSpeed at which the ticker text should scroll
fontSizestring0.5emFont size of the ticker text
fontFamilystring'Arial, sans-serif'Font family of the ticker text

Examples

Here are some example usages of the <NewsTicker /> component.

Example 1: Basic usage

import NewsTicker from 'react-news-ticker';

const App = () => {
  return (
    <NewsTicker content="This is some news" />
  );
};

Example 2: Custom Colors and Scrolling

import NewsTicker from 'react-news-ticker';

const App = () => {
  return (
    <NewsTicker 
      content="Customized news" 
      backgroundColor="#FFC300"
      outlineColor="black" 
      isAutoScroll={true}
    />
  );
};

Contributing

To contribute to this project, please fork the repository and submit a pull request.

License

This project is licensed under the MIT License.


This README covers installation, usage, available props, and some basic examples. You can expand this with more examples, screenshots, or anything else you think would help users understand how to use your package.

1.0.7

8 months ago

1.0.6

8 months ago

1.0.5

8 months ago

1.0.4

8 months ago

1.0.3

8 months ago

1.0.2

8 months ago

1.0.1

8 months ago

1.0.0

8 months ago