StoryKit – Framework-agnostic Instagram-style story list component. Supports React, Vue, Svelte, and Angular with a shared, type-safe core. Features auto-play, progress indicators, pause/hold interactions, NEXT/PREV controls, and customizable themes. Lightweight, easy to integrate, perfect for social feeds, story carousels, and timeline components.
@storykit/core - Framework-agnostic core logic written in TypeScript@storykit/react - React wrapper component@storykit/vue - Vue wrapper component@storykit/svelte - Svelte wrapper component@storykit/angular - Angular wrapper component# Install pnpm if not already installed
npm install -g pnpm
# Clone and install dependencies
pnpm install
# Build all packages
pnpm build
import { StoryCarousel } from '@storykit/react';
const stories = [
{ id: '1', content: 'Story 1', duration: 3000 },
{ id: '2', content: 'Story 2', duration: 4000 },
{ id: '3', content: 'Story 3', duration: 5000 },
];
function App() {
return (
<div style={{ width: '400px', height: '600px' }}>
<StoryCarousel
stories={stories}
autoPlay={true}
onStoryEnd={story => console.log('Story ended:', story)}
onComplete={() => console.log('All stories completed')}
/>
</div>
);
}
import { StoryCarousel } from '@storykit/core';
const stories = [
{ id: '1', content: 'Story 1', duration: 3000 },
{ id: '2', content: 'Story 2', duration: 4000 },
];
const carousel = new StoryCarousel({
stories,
autoPlay: true,
onStoryEnd: story => console.log('Story ended:', story),
onComplete: () => console.log('All stories completed'),
});
carousel.play();
# Install dependencies
pnpm install
# Build all packages
pnpm build
# Build specific package
pnpm --filter @storykit/react build
# Run tests
pnpm test
# Lint code
pnpm lint
# Clean all builds
pnpm clean
packages/
├── native/ # Core TypeScript logic
│ ├── src/
│ │ └── index.ts # StoryCarousel class and types
│ ├── package.json
│ └── tsconfig.json
├── react/ # React wrapper
│ ├── src/
│ │ ├── index.ts
│ │ └── StoryCarousel.tsx
│ └── package.json
├── vue/ # Vue wrapper (TODO)
├── svelte/ # Svelte wrapper (TODO)
└── angular/ # Angular wrapper (TODO)
MIT