Skip to content

bespoyasov/react-scroller

Repository files navigation

React Scroller

React component wrapper for Scroller.

Installation

Add the packages from npm:

npm install prokrutchik react-prokrutchik

Usage

import { Scroller } from "react-prokrutchik";
import "react-prokrutchik/styles.css";

function App() {
  return (
    <Scroller
      position="center"
      duration={500}
      scrollbar="hidden"
      scrollbar="hidden"
      align="start"
    >
      <div>Text...</div>
      <img src="example.png" alt="Images..." />
      {/* ...Or Other content */}
    </Scroller>
  );
}

Configuration

For more configuration options, check out Scroller settings.