react-horizontal-switch-scroll

1.1.9 • Public • Published

Quick start guide

Installing react-horizontal-switch-scroll

$ npm install --save react-horizontal-switch-scroll

Usage

import { SwitchCarousel }  from 'react-horizontal-switch-scroll'

const data = [
    {
        name: "home"
        url: "/"
    },
    {
        name: "about"
        url: "/about.html"
    },
    {
        name: "contact"
        url: "/contact.html"
    }
]

const list = (data) => {
    const list_elements = data.map((elem, index) => {
        return (
            <a href={elem.url}>{elem.name}</a>
        )
    });
    return list_elements;
}

.....


class React-Component extends React.Component {


......


render() {
    return (

        
.....

        <SwitchCarousel
            list={list(data)}
            width={250}
            leftButton={<ArrowLeft> < </ArrowLeft>}
            rightButton={<ArrowRight> > </ArrowRight>}
        />

Readme

Keywords

Package Sidebar

Install

npm i react-horizontal-switch-scroll

Weekly Downloads

2

Version

1.1.9

License

ISC

Unpacked Size

184 kB

Total Files

6

Last publish

Collaborators

  • mfelixson