Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@reelkit/react

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@reelkit/react

React components and hooks for building TikTok/Instagram Reels-style sliders

latest
Source
npmnpm
Version
0.6.1
Version published
Weekly downloads
51
-21.54%
Maintainers
1
Weekly downloads
 
Created
Source

@reelkit/react

npm Bundle size Coverage Star on GitHub

React bindings for @reelkit/core. Drop in a <Reel> component, give it a slide count and a render function — it handles virtualization, gestures, and keyboard/wheel input. ~4.4 kB gzip.

Live Demo · Open in StackBlitz

Installation

npm install @reelkit/react

Quick Start

import { useState } from 'react';
import { Reel, ReelIndicator } from '@reelkit/react';

function App() {
  const [index, setIndex] = useState(0);

  return (
    <Reel
      count={100}
      direction="vertical"
      afterChange={setIndex}
      itemBuilder={(i) => (
        <div style={{ width: '100%', height: '100%' }}>Slide {i + 1}</div>
      )}
    >
      <ReelIndicator count={100} active={index} />
    </Reel>
  );
}

Features

  • <Reel> — virtualized slider, keeps only 3 slides in the DOM
  • <ReelIndicator> — dot indicators that auto-connect to the parent <Reel> via context
  • Measures its own size via ResizeObserver — no width/height props needed
  • Swipe with momentum and snap, keyboard arrows, mouse wheel
  • Loop mode for infinite circular scrolling
  • SSR compatible (Next.js, Remix, etc.)
  • Typed with TypeScript, no @types package needed

API

Reel Props

PropTypeDefaultDescription
countnumberrequiredNumber of slides
itemBuilder(index) => ReactElementrequiredRender function for slides
direction'horizontal' | 'vertical''vertical'Slide direction
initialIndexnumber0Starting slide index
loopbooleanfalseEnable infinite loop
swipeDistanceFactornumber0.12Swipe threshold (0-1)
transitionDurationnumber300Animation duration in ms
enableNavKeysbooleantrueEnable keyboard navigation
enableWheelbooleanfalseEnable mouse wheel navigation
wheelDebounceMsnumber200Wheel debounce duration
apiRefref-Ref to access public API
afterChange(index) => void-Callback after slide change
beforeChange(index, nextIndex) => void-Callback before slide change

ReelIndicator Props

PropTypeDefaultDescription
countnumberrequiredTotal number of slides
activenumberrequiredCurrently active slide index
radiusnumber3Dot radius in pixels
visiblenumber3Number of visible dots
onDotClick(index) => void-Callback when dot is clicked

Documentation

API reference, demos, 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.

Star on GitHub

License

MIT

Keywords

react

FAQs

Package last updated on 27 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts