Core Guide
The @reelkit/core package provides the framework-agnostic slider logic. Use it to build custom integrations or understand the underlying architecture.
Architecture Overview
The core uses a controller pattern with factory functions. No classes — all plain objects returned from closures. Zero dependencies. The core coordinates:
- SliderController — central state management and navigation
- GestureController — touch/pointer drag handling
- KeyboardController — arrow keys and Escape
- WheelController — mouse wheel with debounce
createSliderController
Creates a new slider controller instance that manages all slider state and behavior.
Controller Methods
Navigation
Lifecycle
State Updates
Virtualization
The core renders only 3 slides to DOM at any time (current, previous, next). The range extractor determines which indices are included in the rendered window:
Signals
The core uses a lightweight signal system for reactivity:
Controller State
Access reactive state through controller.state:
Timeline Controller
Build a custom scrub bar for any <video> element. The controller exposes reactive signals for duration, current time, buffered ranges, and scrubbing state, and wires pointer plus keyboard interactions onto any DOM element in one call.
Next Steps
- Core API Reference - all available props
- Framework Guide - components, demos, and integrationFramework Guide - components, demos, and integrationFramework Guide - components, demos, and integration
- Reel Player - TikTok/Reels-style video playerReel Player - TikTok/Reels-style video playerReel Player - TikTok/Reels-style video player
- Lightbox - image & video galleryLightbox - image & video galleryLightbox - image & video gallery
- Stories Player - Instagram-style stories viewerStories Player - Instagram-style stories viewerStories Player - Instagram-style stories viewer