Staaarter

Live Social Proof Bar

A slim, centered pill bar that rotates through a fixed array of social-proof and urgency messages, one at a time, each paired with a lucide icon. The message auto-advances on a timer with a short fade/slide transition between messages.

By Staaarter Team
Booking
Docs
Live preview

Docs

Installation

A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its dependencies and any missing npm packages, and installs them straight into your project.

npx shadcn add https://staaarter.com/r/live-social-proof-bar.json

Prefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/booking/booking13.tsx instead.

Usage

The file also exports booking13Demo, the exact props behind the preview above. Spread it to get a working section in one line, then replace it with your own data.

import { Booking13, booking13Demo } from "@/components/blocks/booking/booking13";

export default function Page() {
  return <Booking13 {...booking13Demo} />;
}

Props

PropTypeDefaultDescription
messagesstring[]noneRotating message strings, shown one at a time in order.
intervalMsnumber4000Milliseconds between automatic message rotations.
classNamestringnoneExtra classes for the outer section element.

Behavior notes

  • The rotation is a real side effect: a setInterval started inside useEffect from a useState(0) index, incrementing modulo the messages length, cleared on unmount. Nothing here is a live/real visitor count, it's a fixed demo message list.
  • Per-message icons come from a small fixed lucide icon array hardcoded in the component and indexed by message position, since a "use client" block can't receive a component value as prop data from its demo file.
  • The fade/slide transition between messages is a CSS animation utility class re-triggered via a key change on the message span, not JS-driven animation.