Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Centered Online Pulse Hero Block for React

A centered showcase hero led by a live presence pill, a pulsing dot and a count of the people online, with two actions and a live project board in a band below.

Framework
UI library

Preview

Preview width

Installation

Part of Pro
Pro unlocks the code and one-line install of every Pro button and text effect, plus the MCP for your AI editor.
Have Pro already? Sign in to open it.Opens here as soon as you're Pro.

Overview

A centered showcase hero whose first line is live presence, for React with Base UI, shown here for Parley, a real-time workspace. The pill pairs a pulsing Online now status with the number of people in Parley right now, which counts up when the page loads. Under the two-line headline and the promise sit the filled Shine Button and an outline Button. Below them a band, ruled across the page column with + marks on its corners, holds a shared project board drawn in greyscale: a title bar with the members' avatars and the same count, three columns of cards, and live cursors with name tags that glide into place when the page loads. The board is masked at its foot, so it runs on below the first screen. Built with Announcement, Badge, Status Pulse Text, Counting Number, Avatar, Guides, Shine Button and Button, with Lucide icons, Tailwind CSS and CSS motion that stays still under reduced motion. For community platforms, real-time collaboration tools, live events and developer tools where activity is the proof.

FAQ

How do I show the real number of people online?

The count is the ONLINE constant at the top of the file; the board's avatar overflow (+244) is worked out from it, so the two always agree. Feed it from your presence service (a WebSocket or server-sent events subscription, or a polling endpoint) and pass each new number to CountingNumber: it counts on from the number showing to the new one. Update it every ten seconds or so rather than on every join and leave, since the pill is a polite status region and every change is read out.

How do I change the pulse's colour or speed?

Use StatusPulseText's props: variant picks the dot's theme colour (success by default, or info, warning, destructive, muted), duration sets one pulse in milliseconds (never faster than one a second), and pulse={false} keeps the dot still, for a status where nothing is happening. The ring is a CSS animation of scale and opacity, so no script runs, and with reduced motion only the dot shows.

How do I change the board and its cursors?

The board is drawn from two arrays at the top of the file: COLUMNS, each with a name and its card titles, and CURSORS, each a name and a place, the Tailwind classes that put it on the board (start-[26%] top-[13.5rem]). They use logical start- offsets, so a right-to-left page mirrors them. The cursors glide in with a CSS transition on first paint; with reduced motion they appear in place. The whole board is decoration, so it is hidden from assistive technology and takes no focus.

What do screen readers hear?

The pill is a status region, the role Announcement takes when it isn't a link, and it reads Online now, 247 people in Parley right now. The number keeps its final value in visually hidden text from the first render, so the count is never read digit by digit. The pulsing dot is decorative: the words carry the status. The board, its avatars and its cursors are hidden from assistive technology, so the page reads as the headline, the promise and the two actions.

How does the hero fit on a phone?

The headline drops its forced line break and wraps, balanced, at text-4xl, and the two actions stack. The Shine Button ends about 370 px down the first screen, and the top of the board shows below it. The board shrinks to two columns and a shorter window, and its third cursor is dropped, so nothing crowds the cards.

When should I use a presence hero instead of a static stats hero?

Use it when your product gets better with people in it at the same time: collaboration tools, chat, live events, multiplayer editors. A live count says the room is busy now. When the number that matters is cumulative, such as total customers or lifetime revenue, a static stats hero says it without implying a live feed.

  • Pro

    Centered Activity Feed Hero

    Stats and live data

    A split hero with a live pill, a headline and two actions beside a ruled feed of recent activity, each row with an avatar, a name, an action and how long ago.

  • Pro

    Avatar Stack Side Rail Hero

    Logos and social proof

    A compact hero for a community: a headline, a Shine Button and a second action beside a side rail of proof: a stack of member avatars over a line of social proof, then three stats in ruled rows.

  • Pro

    A compact start-aligned hero closed by a three-cell social proof bar on its own rule: an avatar stack with the user count, a five-star rating with the review count and a compliance mark.

  • Pro

    Animated Counter Hero

    Stats and live data

    A compact centered hero for an invoicing app with an announcement pill, a Shine Button and a second action, over a hairline band of four figures that count up when they scroll into view.

  • Pro

    Counter Stats Hero

    Stats and live data

    A compact, start-aligned hero for an email API on solid rails: a headline, a Shine Button and an outline button, then four counters in separate cells whose hairlines overshoot their corners.

  • Pro

    Hero With Stats

    Stats and live data

    A split hero with a headline, a Shine Button and a second action beside a rail of four key figures on shared hairlines, each with its period and a small bar trend.