1.0.0-alpha.61 • Published 11 months ago

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

Weekly downloads
-
License
MIT
Repository
github
Last release
11 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

11 months ago

1.0.0-alpha.60

11 months ago

1.0.0-alpha.59

11 months ago

1.0.0-alpha.58

11 months ago

1.0.0-alpha.57

1 year ago

1.0.0-alpha.56

1 year ago

1.0.0-alpha.55

1 year ago

1.0.0-alpha.54

1 year ago

1.0.0-alpha.53

1 year ago

1.0.0-alpha.52

1 year ago

1.0.0-alpha.51

1 year ago

1.0.0-alpha.50

1 year ago

1.0.0-alpha.49

1 year ago

1.0.0-alpha.48

1 year ago

1.0.0-alpha.47

1 year ago

1.0.0-alpha.46

1 year ago

1.0.0-alpha.45

1 year ago

1.0.0-alpha.44

1 year ago

1.0.0-alpha.43

1 year ago

1.0.0-alpha.42

1 year ago

1.0.0-alpha.41

1 year ago

1.0.0-alpha.40

1 year ago

1.0.0-alpha.39

1 year ago

1.0.0-alpha.38

1 year ago

1.0.0-alpha.37

1 year ago

1.0.0-alpha.36

1 year ago

1.0.0-alpha.35

1 year ago

1.0.0-alpha.34

1 year ago

1.0.0-alpha.33

1 year ago

1.0.0-alpha.32

1 year ago

1.0.0-alpha.31

1 year ago

1.0.0-alpha.30

1 year ago

1.0.0-alpha.29

1 year ago

1.0.0-alpha.28

1 year ago

1.0.0-alpha.27

1 year ago

1.0.0-alpha.26

1 year ago

1.0.0-alpha.25

1 year ago

1.0.0-alpha.24

1 year ago

1.0.0-alpha.23

1 year ago

1.0.0-alpha.22

1 year ago

1.0.0-alpha.21

1 year ago

1.0.0-alpha.20

1 year ago

1.0.0-alpha.19

1 year ago

1.0.0-alpha.18

1 year ago

1.0.0-alpha.17

1 year ago

1.0.0-alpha.16

1 year ago

1.0.0-alpha.15

1 year ago

1.0.0-alpha.14

1 year ago

1.0.0-alpha.13

1 year ago

1.0.0-alpha.12

1 year ago

1.0.0-alpha.11

1 year ago

1.0.0-alpha.10

1 year ago

1.0.0-alpha.9

1 year ago

1.0.0-alpha.8

1 year ago

1.0.0-alpha.7

1 year ago

1.0.0-alpha.6

1 year ago

1.0.0-alpha.5

1 year 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