Componentmedia1.21 KB gzipZero dependencies
StoryViewer
Circular story ring with progress animation, avatar names, and tap zones for prev/next.
Preview
Live Preview
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add story-viewerOr install the full npm package:
npm install bigbulluiUsage
tsx3 lines
import { StoryViewer } from "@/components/ui/story-viewer"; <StoryViewer stories={stories} duration={3000} />Source code
story-viewer.tsx + 1 helperZero 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 />| Prop | Type | Description |
|---|---|---|
| stories | Story[] | Configures stories. (Default: []) |
| duration | number | Configures duration. (Default: STORY_DURATION) |