Getting Started
reelkit is a single-item slider — one item visible at a time, like TikTok, Instagram Reels, or Stories. Perfect for vertical video feeds, fullscreen galleries, and swipeable content.
Enjoying ReelKit?
If ReelKit is useful to you, please consider giving it a star on GitHub. It helps other developers find the project and keeps it going. Thank you, I truly appreciate your support!
0.x.x — Unstable API
ReelKit is under active development. While in 0.x.x, APIs may change between minor versions without a deprecation period. Pin your version to avoid unexpected breakage.
Select Your Framework
Try It Online
Try it in the browser, no install required:
Quick Start
Minimal vertical slider with React:
import { Reel, ReelIndicator } from '@reelkit/react';
const items = [
{ id: 1, title: 'Slide 1', color: '#6366f1' },
{ id: 2, title: 'Slide 2', color: '#8b5cf6' },
{ id: 3, title: 'Slide 3', color: '#ec4899' },
];
function App() {
return (
<Reel
count={items.length}
size={[400, 600]}
direction="vertical"
enableWheel
itemBuilder={(index) => (
<div
style={{
width: '100%',
height: '100%',
background: items[index].color,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
fontSize: '2rem',
color: 'white',
}}
>
{items[index].title}
</div>
)}
>
<ReelIndicator />
</Reel>
);
}Quick Start
Minimal vertical slider with Angular:
import { Component } from '@angular/core';
import {
ReelComponent,
ReelIndicatorComponent,
RkReelItemDirective,
} from '@reelkit/angular';
const items = [
{ id: 1, title: 'Slide 1', color: '#6366f1' },
{ id: 2, title: 'Slide 2', color: '#8b5cf6' },
{ id: 3, title: 'Slide 3', color: '#ec4899' },
];
@Component({
standalone: true,
imports: [ReelComponent, ReelIndicatorComponent, RkReelItemDirective],
template: `
<rk-reel [count]="items.length" [size]="[400, 600]"
direction="vertical" [enableWheel]="true">
<ng-template rkReelItem let-i let-size="size">
<div [style.width.px]="size[0]" [style.height.px]="size[1]"
[style.background]="items[i].color"
style="display:flex;align-items:center;justify-content:center;
font-size:2rem;color:#fff">
{{ items[i].title }}
</div>
</ng-template>
<rk-reel-indicator />
</rk-reel>
`,
})
export class AppComponent {
readonly items = items;
}Quick Start
Minimal vertical slider with Vue:
<script setup lang="ts">
import { Reel, ReelIndicator } from '@reelkit/vue';
const items = [
{ id: 1, title: 'Slide 1', color: '#6366f1' },
{ id: 2, title: 'Slide 2', color: '#8b5cf6' },
{ id: 3, title: 'Slide 3', color: '#ec4899' },
];
</script>
<template>
<Reel
:count="items.length"
:size="[400, 600]"
direction="vertical"
enable-wheel
>
<template #item="{ index, size }">
<div
:style="{
width: size[0] + 'px',
height: size[1] + 'px',
background: items[index].color,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
fontSize: '2rem',
color: '#fff',
}"
>
{{ items[index].title }}
</div>
</template>
<ReelIndicator />
</Reel>
</template>Key Concepts
Reel
The Reel component is the main container that manages slider state, handles touch gestures, keyboard navigation, and animations. It uses a render prop pattern via itemBuilder for rendering slides.
itemBuilder
The itemBuilder prop is a function that receives the index and returns the content for each slide. This pattern enables virtualization — only visible items are rendered.
ReelIndicator
Optional component that displays Instagram-style progress indicators showing the current position in the slider.
import { Reel, ReelIndicator } from '@reelkit/react';
function App() {
return (
<Reel
count={items.length}
size={[400, 600]}
itemBuilder={(index) => <Slide data={items[index]} />}
>
<ReelIndicator />
</Reel>
);
}<rk-reel [count]="items.length" [size]="[400, 600]">
<ng-template rkReelItem let-index>
<app-slide [data]="items[index]" />
</ng-template>
<rk-reel-indicator />
</rk-reel><Reel :count="items.length" :size="[400, 600]">
<template #item="{ index }">
<Slide :data="items[index]" />
</template>
<ReelIndicator />
</Reel>Navigation
Built-in navigation methods:
- Touch/Swipe: Drag to navigate with momentum and snap
- Keyboard: Arrow keys (overlay components also handle Escape to close)
- Mouse Wheel: Enable with
enableWheelprop - Programmatic: Use
apiReffornext(),prev(),goTo()
import { useRef } from 'react';
import { Reel, type ReelApi } from '@reelkit/react';
function App() {
const apiRef = useRef<ReelApi>(null);
return (
<>
<Reel
count={10}
size={[400, 600]}
apiRef={apiRef}
itemBuilder={(index) => <Slide index={index} />}
/>
<button onClick={() => apiRef.current?.prev()}>Prev</button>
<button onClick={() => apiRef.current?.next()}>Next</button>
<button onClick={() => apiRef.current?.goTo(5)}>Go to 5</button>
</>
);
}<rk-reel
[count]="10"
[size]="[400, 600]"
(apiReady)="reelApi = $event"
>
<ng-template rkReelItem let-index>
<app-slide [index]="index" />
</ng-template>
</rk-reel>
<button (click)="reelApi?.prev()">Prev</button>
<button (click)="reelApi?.next()">Next</button>
<button (click)="reelApi?.goTo(5)">Go to 5</button><script setup lang="ts">
import { ref } from 'vue';
import { Reel, type ReelExpose } from '@reelkit/vue';
const reelRef = ref<InstanceType<typeof Reel> & ReelExpose>();
</script>
<template>
<Reel ref="reelRef" :count="10" :size="[400, 600]">
<template #item="{ index }">
<Slide :index="index" />
</template>
</Reel>
<button @click="reelRef?.prev()">Prev</button>
<button @click="reelRef?.next()">Next</button>
<button @click="reelRef?.goTo(5)">Go to 5</button>
</template>Next Steps
- Installation - all packages and setup options
- Core Guide - framework-agnostic engine
- 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