yah-scroller
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

YAH-Scroller

NPM version npm-typescript License

Yet another horizontal scroller for React. A simple and lightweight component that allows you to scroll horizontally through a list of items on both mobile and desktop with a small 'stretch' effect.

Live Demo ( coming soon )

Example

Installation:

npm install yah-scroller --save-dev

or

yarn add -D yah-scroller

Usage :

Add yah-scroller to your component:

import React from 'react'
import ReactDOM from 'react-dom/client'
import { YahScroller } from 'yah-scroller'

const root = ReactDOM.createRoot(document.getElementById('root') as HTMLElement)
root.render(
    <React.StrictMode>
        <div>
            <h2>Simple scroller</h2>
            <YahScroller className="horizontal-scroll">
                <div key={'c1'} className={'category'}>Category 1</div>
                <div key={'c2'} className={'category'}>Category 2</div>
                <div key={'c3'} className={'category'}>Category 3</div>
                <div key={'c4'} className={'category'}>Category 4</div>
                <div key={'c5'} className={'category'}>Category 5</div>
                <div key={'c6'} className={'category'}>Category 6</div>
            </YahScroller>
        </div>
    </React.StrictMode>,
)

Package Sidebar

Install

npm i yah-scroller

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

21.6 kB

Total Files

18

Last publish

Collaborators

  • bram-hammer