Componentmedia1.21 KB gzipZero dependencies

StoryViewer

Circular story ring with progress animation, avatar names, and tap zones for prev/next.

Preview

Live Preview
Open ↗

Installation

Tokens guide →

Add to your project via CLI (zero dependencies, code you own):

npx bigbullui add story-viewer

Or install the full npm package:

npm install bigbullui

Usage

tsx3 lines
import { StoryViewer } from "@/components/ui/story-viewer"; <StoryViewer stories={stories} duration={3000} />

Source code

story-viewer.tsx + 1 helper

Zero third-party dependencies (2 local files shown in tabs below).

tsxstory-viewer.tsx168 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export interface Story {  id: string;  author: string;  initials: string;  body?: string;} export interface StoryViewerProps {  stories: Story[];  duration?: number;} const STORY_DURATION = 3000;

Props

Interactive Prop Playground

Tweak parsed AST props below to generate ready-to-paste JSX.

tsx3 lines
import { StoryViewer } from "@/components/ui/story-viewer"; <StoryViewer />
PropTypeDescription
storiesStory[]Configures stories. (Default: [])
durationnumberConfigures duration. (Default: STORY_DURATION)