Package Exports
- @reelkit/core
- @reelkit/core/package.json
Readme
@reelkit/core
The engine behind ReelKit — handles slider logic, gesture recognition, and transitions without depending on any UI framework. Ships its own signal-based reactive system so you don't need RxJS or similar.
Installation
npm install @reelkit/coreQuick Start
import { createSliderController } from '@reelkit/core';
const slider = createSliderController({
count: 100,
direction: 'vertical',
});
// Navigate
slider.next();
slider.prev();
slider.goTo(5);
// Read state via signals
console.log(slider.currentIndex.value); // 5
// Subscribe to changes
slider.currentIndex.subscribe((index) => {
console.log('Slide changed:', index);
});Features
- Renders only 3 slides at a time (virtualized), handles 10,000+ items
- Zero dependencies, ~4.0 kB gzip
- Factory functions over classes —
createSliderController,createGestureController,createKeyboardController,createWheelController - Built-in
Signal,ComputedSignal, andreactionprimitives for reactive state - Touch gestures with momentum and configurable thresholds
- Keyboard and wheel navigation with debouncing
- Infinite loop mode
- Optional ResizeObserver-based auto-sizing
- Strict TypeScript throughout
Documentation
API reference and guides at reelkit.dev.
Support
If ReelKit saved you some time, a star on GitHub would mean a lot — it's a small thing, but it really helps the project get noticed.