Scrollbun
Scrollbun is a lightweight and customizable React component that allow you effortlessly create horizontal scrolling container for your app.
Installation
To install dependencies:
npm install scrollbun
bun install scrollbun
Usage
Here's an example of usage:
import Scrollbun from 'scrollbun'
function App() {
return (
<Scrollbun style={{ width: '500px' }}>
<div style={{ width: '500px', height: '300px' }} />
<div style={{ width: '500px', height: '300px' }} />
</Scrollbun>
)
}
Props
Prop name | Description | Default value |
---|---|---|
direction | Can be 'horizontal' or 'vertical' . |
'horizontal' |
scrollRate | A number to control scroll rate. | 0.5 |
...rest | any HTMLDivElement prop, except onWheel , that will be added to the main div element. |
n/a |
Contributors ✨
Olzh K. Kurikov |
D. Sailaubek |
LICENSE
MIT
This project was created using bun init
in bun v1.0.0. Bun is a fast all-in-one JavaScript runtime.