npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-marquee-line

v1.0.1

Published

React Marquee Line is a react component that can be used for creating a horizontal-scrolling-board-like effect, or a vertically fade in and fade up effect.

Downloads

546

Readme

react-marquee-line

React Marquee Line is a react component that can be used for creating a horizontal-scrolling-board-like effect, or a vertically fade in and fade up effect.

🍾 Features

  1. lower pressure on rendering engine
  2. running item itself can be a React Element or a string
  3. configurable running speed
  4. configurable directions, vertical and horizontal

🏄🏻‍♀️Demo

coming soon... I promise.

🎢 How to use

Step 1. Installation

Using npm:

  npm install react-marquee-line

Using yarn:

  yarn add react-marquee-line

Step 2. Import Marquee

import Marquee from 'react-marquee-line';

Step 3: Pass down your list, and other config that suit your need

  1. using horizontal marquee
  import Marquee from 'react-marquee-line'

  // create an react element that has onClick handler, sorry for the long name
  const someReactElemYouCanClick = <span>
      <a href="https://codesandbox.io">Click me </a> for more details
    </span>

  // set a list your want it to run
  const list = [
    'the 1st running item',
    someReactElemYouCanClick,
    'the 2rd running item'
  ]
  // pass the list to Marquee, you are good to go
  <Marquee list={list}/>
  1. using vertical marquee
  import Marquee from 'react-marquee-line'

  // create an react element that has onClick handler, sorry for the long name
  const someReactElemYouCanClick = <span>
      <a href="https://codesandbox.io">Click me </a> for more details
    </span>

  // set a list your want it to run
  const list = [
    'the 1st running item',
    someReactElemYouCanClick,
    'the 2rd running item'
  ]
  // pass the list to Marquee, and set `direction`, easy-peasy
  <Marquee list={list} direction='vertical'/>

configurable properties for <Marquee />

| properties name | descriptionn | type | default value | belongs to which direction | | --------------- | ------------------------------------------------------------------------------------------------------- | ------ | ------------- | -------------------------- | | list | the list whose items you want them to run | Array | [] | both | | direction | to specify which direction you want marquee to run, available values: 'horizontal', 'vertical' | String | 'horizontal' | both | | lines | vertical only, specify how many lines of item you want to show at one time | Number | 1 | vertical | | gear | horizontal only, the horizontal running speed control for marquee, available values are: 1, 1.5, 2, 2.5 | Number | 1.5 | horizontal |

Want to overwrite styles of <Marquee /> ?

Good chance you need this, and you should actually, 'cause the default styles for this <Marquee /> is way too spartan. To overwrite its styles, you can simply import a .css file that has your ideal styles after the import of <Marquee />. As for the selectors specific for this <Marquee />, you can find them at the Elements Panel of dev tool; find those classname prefixed with 'react-marquee-line-'

📝TODO

  1. add live demo
  2. add validation for prop passed in