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

Source
npmnpm
Version
0.1.1
Version published
Weekly downloads
115
121.15%
Maintainers
1
Weekly downloads
 
Created
Source

@reelkit/react

npm Bundle size Star on GitHub

React components and hooks for building TikTok/Instagram Reels-style sliders. Virtualized rendering, touch gestures, keyboard/wheel navigation — all in ~3.4 kB gzip.

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 component (only 3 slides in DOM)
  • <ReelIndicator> — Instagram-style position dots
  • Auto-size — measures container via ResizeObserver, no explicit size props needed
  • Touch gestures — swipe with momentum and snap
  • Keyboard & wheel — arrow keys and scroll navigation
  • Loop mode — infinite circular scrolling
  • SSR ready — works with Next.js, Remix, and any SSR setup
  • TypeScript — full type safety

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
useNavKeysbooleantrueEnable 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

Full API reference, interactive demos, and guides at reelkit.dev.

License

MIT

Keywords

react

FAQs

Package last updated on 13 Mar 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