1.0.0-alpha.61 • Published 9 months ago

@open-norantec/ui-libraries v1.0.0-alpha.61

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

Scroller Coaster

A customizable, flexible, and elegant scrollbar component for React.js and Next.js.

Live Demo

Features

  • 🎯 Support for both vertical and horizontal scrolling
  • 🌐 RTL layout support
  • 🎨 Fully customizable styling
  • 🔄 Smooth scrolling experience
  • ⚡ High performance, no jank
  • 📱 Responsive design

Installation

npm install scroller-coaster

Basic Usage

import { ScrollerCoaster } from 'scroller-coaster';

const App = () => {
  return (
    <ScrollerCoaster
      style={{
        width: '400px',
        height: '300px',
        border: '1px solid #ccc'
      }}
    >
      {/* Your content */}
    </ScrollerCoaster>
  );
};

API

ScrollerCoaster Props

PropertyTypeDefaultDescription
draggingScrollMaximumSpeednumber15Maximum speed of scroll when dragging (px/frame)
draggingScrollThresholdnumber50Threshold to trigger drag scrolling (px)
horizontalTrackPropsScrollerCoasterTrackProps-Horizontal scrollbar track properties
verticalTrackPropsScrollerCoasterTrackProps-Vertical scrollbar track properties
dir'rtl' | 'ltr''ltr'Text direction

ScrollerCoasterTrackProps

PropertyTypeDefaultDescription
showMode'always' | 'hover' | 'scrolling''scrolling'Scrollbar visibility mode
sizenumber12Scrollbar size (px)
thumbPropsReact.HTMLAttributes-Scrollbar thumb properties

Examples

Custom Scrollbar Styling

<ScrollerCoaster
  horizontalTrackProps={{
    showMode: 'always',
    size: 8,
    thumbProps: {
      style: {
        backgroundColor: '#6366f1',
        borderRadius: '4px'
      }
    }
  }}
  verticalTrackProps={{
    showMode: 'hover',
    size: 8,
    thumbProps: {
      style: {
        backgroundColor: '#6366f1',
        borderRadius: '4px'
      }
    }
  }}
>
  {/* Content */}
</ScrollerCoaster>

RTL Support

<ScrollerCoaster
  dir="rtl"
  style={{
    width: '400px',
    height: '300px'
  }}
>
  {/* RTL content */}
</ScrollerCoaster>

Browser Support

  • Chrome (latest)
  • Firefox (latest)
  • Safari (latest)
  • Edge (latest)

Development

# Install dependencies
npm install

# Run development environment
npm run demo

# Build library
npm run build:lib

# Build demo
npm run build:demo

License

MIT

Contributing

  1. Fork the project
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'feat: add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request
1.0.0-alpha.61

9 months ago

1.0.0-alpha.60

9 months ago

1.0.0-alpha.59

10 months ago

1.0.0-alpha.58

10 months ago

1.0.0-alpha.57

11 months ago

1.0.0-alpha.56

11 months ago

1.0.0-alpha.55

11 months ago

1.0.0-alpha.54

11 months ago

1.0.0-alpha.53

12 months ago

1.0.0-alpha.52

12 months ago

1.0.0-alpha.51

12 months ago

1.0.0-alpha.50

12 months ago

1.0.0-alpha.49

12 months ago

1.0.0-alpha.48

12 months ago

1.0.0-alpha.47

12 months ago

1.0.0-alpha.46

12 months ago

1.0.0-alpha.45

12 months ago

1.0.0-alpha.44

12 months ago

1.0.0-alpha.43

12 months ago

1.0.0-alpha.42

12 months ago

1.0.0-alpha.41

12 months ago

1.0.0-alpha.40

12 months ago

1.0.0-alpha.39

12 months ago

1.0.0-alpha.38

12 months ago

1.0.0-alpha.37

12 months ago

1.0.0-alpha.36

12 months ago

1.0.0-alpha.35

12 months ago

1.0.0-alpha.34

12 months ago

1.0.0-alpha.33

12 months ago

1.0.0-alpha.32

12 months ago

1.0.0-alpha.31

12 months ago

1.0.0-alpha.30

12 months ago

1.0.0-alpha.29

12 months ago

1.0.0-alpha.28

12 months ago

1.0.0-alpha.27

12 months ago

1.0.0-alpha.26

12 months ago

1.0.0-alpha.25

12 months ago

1.0.0-alpha.24

12 months ago

1.0.0-alpha.23

12 months ago

1.0.0-alpha.22

12 months ago

1.0.0-alpha.21

12 months ago

1.0.0-alpha.20

12 months ago

1.0.0-alpha.19

12 months ago

1.0.0-alpha.18

12 months ago

1.0.0-alpha.17

12 months ago

1.0.0-alpha.16

12 months ago

1.0.0-alpha.15

12 months ago

1.0.0-alpha.14

12 months ago

1.0.0-alpha.13

12 months ago

1.0.0-alpha.12

12 months ago

1.0.0-alpha.11

12 months ago

1.0.0-alpha.10

12 months ago

1.0.0-alpha.9

12 months ago

1.0.0-alpha.8

12 months ago

1.0.0-alpha.7

12 months ago

1.0.0-alpha.6

12 months ago

1.0.0-alpha.5

12 months ago

1.0.0-alpha.4

1 year ago

1.0.0-alpha.3

1 year ago

1.0.0-alpha.2

1 year ago

1.0.0-alpha.1

1 year ago

1.0.0-alpha.0

1 year ago