Headless components for React.js and UI utilities
npm install @open-norantec/ui-librariesA customizable, flexible, and elegant scrollbar component for React.js and Next.js.
- 🎯 Support for both vertical and horizontal scrolling
- 🌐 RTL layout support
- 🎨 Fully customizable styling
- 🔄 Smooth scrolling experience
- ⚡ High performance, no jank
- 📱 Responsive design
``bash`
npm install scroller-coaster
`tsx
import { ScrollerCoaster } from 'scroller-coaster';
const App = () => {
return (
width: '400px',
height: '300px',
border: '1px solid #ccc'
}}
>
{/ Your content /}
);
};
`
| Property | Type | Default | Description |
|----------|------|---------|-------------|
| draggingScrollMaximumSpeed | number | 15 | Maximum speed of scroll when dragging (px/frame) |
| draggingScrollThreshold | number | 50 | Threshold to trigger drag scrolling (px) |
| horizontalTrackProps | ScrollerCoasterTrackProps | - | Horizontal scrollbar track properties |
| verticalTrackProps | ScrollerCoasterTrackProps | - | Vertical scrollbar track properties |
| dir | 'rtl' \| 'ltr' | 'ltr' | Text direction |
| Property | Type | Default | Description |
|----------|------|---------|-------------|
| showMode | 'always' \| 'hover' \| 'scrolling' | 'scrolling' | Scrollbar visibility mode |
| size | number | 12 | Scrollbar size (px) |
| thumbProps | React.HTMLAttributes
`tsx`
showMode: 'always',
size: 8,
thumbProps: {
style: {
backgroundColor: '#6366f1',
borderRadius: '4px'
}
}
}}
verticalTrackProps={{
showMode: 'hover',
size: 8,
thumbProps: {
style: {
backgroundColor: '#6366f1',
borderRadius: '4px'
}
}
}}
>
{/ Content /}
`tsx`
style={{
width: '400px',
height: '300px'
}}
>
{/ RTL content /}
- Chrome (latest)
- Firefox (latest)
- Safari (latest)
- Edge (latest)
`bashInstall dependencies
npm install
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`)