Componentfeedback0.48 KB gzipZero dependencies
LiveBadge
LIVE indicator with blinking dot, mono uppercase label, and optional viewer count that ticks
Preview
Live Preview
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add live-badgeOr install the full npm package:
npm install bigbulluiUsage
tsx3 lines
import { LiveBadge } from "@/components/ui/live-badge" <LiveBadge viewers={128} variant="full" />Source code
live-badge.tsx + 1 helperZero third-party dependencies (2 local files shown in tabs below).
tsxlive-badge.tsx58 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export interface LiveBadgeProps { viewers?: number; variant?: "badge" | "full"; className?: string;} export function LiveBadge({ viewers, variant = "badge", className, ...props}: LiveBadgeProps) { const motionReduceClass = "motion-reduce:animate-none motion-reduce:transition-none";Props
Interactive Prop Playground
Tweak parsed AST props below to generate ready-to-paste JSX.
tsx3 lines
import { LiveBadge } from "@/components/ui/live-badge"; <LiveBadge />| Prop | Type | Description |
|---|---|---|
| viewers | number | Configures viewers. |
| variant | "badge" | "full" | Visual style variant. (Default: "badge") |
| className | string | Optional Tailwind or custom CSS classes merged with component styles. |