Live visitors
ProA realtime visitors card where the live count rolls digit by digit, new arrivals ping in on a dotted world map, the top pages reorder with bars, and signups and upgrades tick in with country flags.
Live visitors
people on the site now128 people on the site now
Top pages
- /pricing31 visitors
- /docs/quickstart24 visitors
- /19 visitors
- /changelog12 visitors
Just now
- Signed upBerlinSigned up, Berlin, Germany
- Upgraded to ProSan FranciscoUpgraded to Pro, San Francisco, United States
- Signed upTokyoSigned up, Tokyo, Japan
- Signed upLondonSigned up, London, United Kingdom
- Realtime visitors on a marketing site or app, next to signups and upgrades as they happen.
- Launch days and campaigns where a team watches traffic and conversions live.
- Admin and growth dashboards that need one glanceable tile for right now.
- Historical trends over days or weeks; use a chart with axes.
- Precise geography or per-country breakdowns; use a table or a proper map.
- A single number with no context; use a stat card.
Installation
Pro source and install commands unlock with a Pro plan.
import { LiveVisitors } from "@/components/arc/live-visitors/live-visitors"; export function RealtimeCard({ count, pages, arrivals, conversions, status }) { // Feed it from your realtime source (a websocket, SSE or a 2s poll of your analytics API). return ( <LiveVisitors count={count} pages={pages} visitors={arrivals} events={conversions} connection={status} onPausedChange={paused => (paused ? socket.pause() : socket.resume())} /> );}API reference
2 parts. The first is the root.
LiveVisitors
A realtime visitors card: a pulsing live status, a count that rolls digit by digit, a dotted world map where new arrivals ping in and fade, the top pages right now with bars, and a ticker of signups and upgrades with country flags. With no props it plays a simulated stream of a SaaS marketing site.
countnumber–People on the site right now. Leave it out to play the built-in simulated stream; once set, the card shows only the data you pass.pagesLivePage[][]Pages with people on them: { path, visitors }. The card sorts them and lists the top few with bars scaled to the busiest page. Rows slide when the order changes.visitorsLiveVisitorPing[][]Recent arrivals as map dots: { id, lat, lon, kind? }. New ids ping in, removed ids fade out. kind "event" draws a stronger ring. Keep it to the last few seconds of arrivals.eventsLiveVisitorEvent[][]Recent conversions, newest first: { id, label, city, country, at, lat?, lon?, flag? }. country is an ISO alpha-2 code; US, GB, DE, FR, NL, SE, CH, JP, IN and BR have built-in flags, others take flag or a neutral swatch. With lat and lon the newest event is labelled on the map for 2s.connection"live" | "connecting" | "reconnecting""live"The stream's state. connecting shows placeholders in the same space; reconnecting keeps the last data and switches the status to a warning dot with the word Reconnecting.pausedboolean–Controls the pause state. While paused the card holds the last snapshot, whatever you keep passing.defaultPausedbooleanfalseStarts paused when uncontrolled.onPausedChange(paused: boolean) => void–Called from the pause button. Use it to close or pause your own subscription.hidePausebooleanfalseHides the pause button.label(count: number) => string"people on the site now"The words after the number, pluralized from the count. Use it for "in the app now" or "watching the stream".maxPagesnumber4How many pages to list.maxEventsnumber4How many events to list.titlestring"Live visitors"Accessible name of the card.classNamestring–Extra class on the card. It is at most 640px wide and fills narrower containers.useLiveVisitorsSimulation
The simulated stream behind the default demo, for prototypes and tests: about 128 people, a new arrival every 600ms, drifting page counts and a signup or upgrade every 2.4s. Nothing is fetched or tracked.
activebooleantrueHolds the stream when false. Returns { count, pages, visitors, events }.- Tab
- Reaches the pause button. The map and lists are read-only.
- EnterorSpace
- Pauses or resumes live updates.
- The card is a labelled section; the count is read once as plain text ("128 people on the site now"), and the rolling digits are hidden from screen readers.
- The pause button is a toggle with aria-pressed and a label that names the action; its tooltip says the same.
- Status is never color alone: the dot always sits next to Live, Paused, Connecting or Reconnecting.
- Each event row reads as one sentence with the country spelled out and the time in words ("Signed up, Berlin, Germany, 12 seconds ago"). Flags are decorative.
- The map is decorative and hidden; the same information is in the lists.
- Count changes are not announced, so screen readers are not flooded. A polite live region reports pause and resume, and says when the stream is simulated.
- Digits roll on their own strips (280ms ease-out) with tabular numerals, so the number never changes width; a new leading digit (99 to 100) grows in.
- New visitors fade in on the map with one ring that expands and fades (900ms); events get a stronger ring and a small city label for 2s. Expired dots fade out over 400ms.
- Page rows and event rows move as one step: rows slide by one row height (280ms), the new row fades in (160ms) and the last one fades out below the clip. Bars ease to their new width.
- The live dot pulses every 1.6s only while live and on screen. The state label crossfades (out 100ms, in 160ms) in a reserved width.
- Reduced motion keeps every update but drops the rolls, rings, slides and pulse.
- Holds 640px at most and fills narrower containers through a container query.
- Below 520px card width the two lists stack and padding drops to 16px; the map scales with the card.
- Paths, cities and labels truncate with an ellipsis; counts and times keep fixed right-aligned columns.
- The land is one SVG path of round caps computed once; pings are a handful of circles.
- Rows, bars and digits move with CSS transforms and widths on absolutely positioned elements, so nothing reflows the card.
- The pulse, clock and simulation stop while the card is off screen (IntersectionObserver) or paused.
Notes for AI
Give your coding assistant the Markdown reference instead of screenshots.
- Pick this for a realtime analytics view, an admin home or a launch day dashboard tile that answers who is here right now.
- Without count it is a self-playing demo. As soon as you pass count, pass pages, visitors and events too.
- Send arrivals as a rolling window (ids that stay for 5 to 8 seconds); the component handles enter and exit animations from id changes.
- Keep event labels short and past tense (Signed up, Upgraded to Pro) and never show personal data such as emails in the ticker.
- Use connection to reflect the socket state instead of hiding the card.
The full library index for assistants is at /llms.txt.