Skip to content
WingoUI
ComponentsTemplatesDocsPricingAI agentsBlogChangelogContact
Components
Buttons & Actions
ButtonButton GroupCopy ButtonDelete ButtonTheme ToggleToggleToggle Group
Inputs
Avatar UploadCalendarCheckboxColor PickerComboboxCountry SelectCron PickerCurrency InputDate PickerDate Range PickerDate Time PickerDuration PickerEmail InputEmoji PickerFile UploadFilter BuilderInputInput GroupListboxMasked InputMention InputMonth PickerMulti SelectNumber InputOTP InputPassword InputPhone InputRadio GroupRatingSearch InputSegmented ControlSelectSignature PadSliderSwitchTag InputTextareaTime PickerTimezone SelectTree Select
Forms
Address InputBooking WidgetCSV ImportFieldForm WizardInline EditInvoice line itemsRich Text EditorSchema Builder
Navigation
Back To TopBounce SidebarBreadcrumbCommand MenuGlobal SearchGooey NavHook SidebarNav MenuNav TabsPaginationProximity SidebarScroll ProgressSidebarStepsTable Of ContentsTabsTopbarUser MenuWorkspace Switcher
Overlays
Alert DialogContext MenuDialogDrawerDropdown MenuFamily DrawerHover CardPopoverShare DialogSheetShortcuts DialogTooltipTour
Feedback
AlertBannerCookie ConsentEmoji ReactionEmpty StateNotification BellNotification CenterProgressRoute ProgressSetup ChecklistSkeletonSpinnerToast
Data Display
Approval FlowAvatarBadgeCalendar ViewCode BlockComment ThreadContact cardCountdownDescription ListDiff ViewerFile ListFile managerFolderGanttJSON ViewerKbdLog ViewerMarkdownPresenceSchedulerTagTimelineTree View
Tables & Lists
Audit LogData TableDeal PipelineEditable GridKanbanListMembers tablePermissions MatrixTableTask ListVirtual List
Charts & Stats
Animated CounterArea chartBar chartDonut chartFunnel chartGaugeGitHub ActivityHeatmap calendarLeaderboardLine chartRadar chartRadial barSparklineStat CardTrackerTrend badge
Layout
AccordionApp ShellCardCollapsibleDetail LayoutEntity HeaderPage HeaderScroll AreaSeparatorSettings LayoutSplit ViewToolbar
Media
Audio PlayerCarouselCSV ViewerDOCX EditorDOCX ViewerExcel ViewerFile SystemImage compareImage CropperImage GalleryImage LightboxLocation MapPDF ViewerPowerPoint ViewerQR CodeStep PlayerVideo Player
AI Kit
Agent Status CardChat MessageChat ThreadChat WidgetConversation ListFluid OrbGrid RevealMatrix OrbModel PickerPrompt InputReasoning IndicatorRule BuilderSuggestion ChipsTool Call TimelineUsage MeterVoice InputWorkflow Canvas
Text & Effects
Background PatternGravity LettersMarqueeTerminalText AnimateText Rotate
Mobile
Action SheetBottom Tab BarFABHaptic ButtonHero HeaderInstall PromptLarge Title HeaderNotification BannerOnboarding CarouselPicker WheelPull To RefreshSlide To ConfirmSticky CTA BarSwipe DeckSwipeable Tabs
Commerce
Cart drawerCategory pickerCheckout stepsCoupon inputFavorite buttonFilter panelListing cardListing gridOrder trackerPricePrice rangePricing tableProduct galleryQuantity stepperReviewsSeller card
Marketing Sections
App Download SectionBlog Cards SectionCTA SectionFAQ SectionFeature GridFeature ShowcaseHero SectionIntegrations SectionLogo CloudMarketing FooterMarketing HeaderMarketing SectionNewsletter SectionPricing SectionStats SectionSteps SectionTeam SectionTestimonials SectionTimeline SectionVideo Section
Blocks
Admin Dashboard PageAdmin ShellAI Chat PageAPI Keys PageAutomation Builder PageCheckout PageCRM Contact PageCRM Pipeline PageError PagesInbox PageInvoice PageKPI DashboardListing Detail PageLogin PageMarketplace Home PageMarketplace Search PageMarketplace ShellMobile App HomeOnboarding FlowOrder History PagePost Listing WizardPricing PageProfile PageRegister PageSettings PageUsers Admin Page
Templates
About PageAcademy PageAccessibility PageAffiliate PageAgency PageAI Product PageAppointment Booking PageBlog PageBlog Post PageBug Bounty PageCareers PageChangelog PageCommunity PageCompare PageContact PageCustomer Story PageCustomers PageDemo Booking PageDevelopers PageDocs Home PageDownload PageEnterprise PageEvents PageExperts PageFAQ PageFeature PageGlossary PageHelp Article PageHelp Center PageHome Services PageImpact PageIntegration Detail PageIntegrations PageJob Detail PageLanding PageLaunch PageLegal PageManifesto PagePortfolio PagePress PageProduct Tour PagePromo PageReal Estate PageReferral PageResearch Report PageRestaurant PageRoadmap PageROI Calculator PageSecurity PageSolutions PageStartups PageStatus PageStorefront PageSwitch PageTemplate Gallery PageTravel PageWaitlist PageYear in Review Page
Hooks & Utilities
AI ChatChart kitCommerceDate utilsFile exportFile typesFiltersForm validationHapticsInvoicingMotion presetsNavigationNumber formatRelative timeRomanian locationsSpreadsheetText matchTonesUIProvideruseClipboarduseConsentuseControllableStateuseCooldownuseDebounceuseKeyboardInsetuseLocaleuseLongPressuseMediaControlsuseMediaQueryuseOverflowItemsusePersistedStateuseScrollEdgesuseScrollStateuseSelectionuseShortcutuseStickToBottom
GalleryTheme

Data Display

Presence

Data Display

Presence React component for Tailwind CSS v4

MarkdownScheduler
Live props
Layout
max4
Appearance
size
indicator
overlap
surfaceColor
Content
showOffline
summary
hideSelf
locale
Behavior
currentUserId
showList
tooltips
responsive
align
State
defaultOpen
Code
import { Presence } from "@/components/ui/presence"

<Presence />
  1. Home
  2. Components
  3. Data Display
  4. Presence
Pro

Presence React component for Tailwind CSS v4

v1.0.0·Added in 1.0.0

React presence indicators for collaboration: an avatar stack with status rings and a who-is-here list, typing, live cursors and last seen.

People joining pop into the stack on a quick spring and the others slide over; people leaving shrink away, and a status change only recolors the ring, so nobody jumps places. Hover or focus an avatar for the name and what they are doing (a long press on touch). Tap any avatar or the +N chip to open the full list, grouped as here now, away or busy, and offline with the time last seen: a popover on desktop, a bottom sheet on phones. Tab lands on the stack once; Left and Right (Home and End) move between avatars, Enter or Space opens the list, Escape closes it and focus returns to the avatar you pressed. The typing line fades in with the names, lingers 400ms after the last keystroke so it never flickers, and is announced politely. Cursors glide to each new position on a spring (they jump with reduced motion) and their name chip fades to the bare arrow after a few idle seconds. In the playground, Daniel can join and leave and Ryan can come back, while two scripted cursors move over the invoice.

Presence is a Pro React component in the React data display components category, written in TypeScript for React 19 and Tailwind CSS v4. It installs as source with npx wingo-ui@latest add presence, together with Avatar, Tooltip, Popover, Relative time, useLocale and 5 more and the npm package motion.

Add to a project

Requirements: React 19 and Tailwind CSS v4, in Next.js (App Router or Pages), Vite or React Router. Installation guide · Next.js setup · Vite setup

npx wingo-ui@latest add presence

Presence is part of Pro, with 298 more Pro items: $8 a month or $150 once. 14-day refund before you download any Pro item. See plans

Usage

Import Presence from @/components/ui/presence.

import { Presence, PresenceCursors, TypingIndicator, type PresenceUser } from "@/components/ui/presence"

const users: PresenceUser[] = [
  { id: "ana", name: "Emma Carter", avatar: "/demo/ana-pop.jpg", status: "online" },
  { id: "mihai", name: "Michael Reed", status: "online", activity: "editing the lines" },
  { id: "radu", name: "Ryan Mitchell", status: "away" },
  { id: "vlad", name: "Lucas Grant", status: "offline", lastSeen: Date.now() - 40 * 60_000 },
]

export function InvoiceHeader() {
  return (
    <div className="relative rounded-3xl bg-surface p-5 shadow-raised">
      <div className="flex items-center justify-between gap-3">
        <h2 className="text-lg font-semibold">Invoice #2026-0412</h2>
        <Presence users={users} currentUserId="ana" surfaceColor="var(--surface)" labels={{ group: "Viewing now" }} />
      </div>
      <TypingIndicator users={users.filter((user) => user.typing)} labels={{ typing: (names) => `${names[0]} is writing…` }} />
      <PresenceCursors users={users} cursors={[{ userId: "mihai", x: 0.4, y: 0.6 }]} relative />
    </div>
  )
}

Props

  • users*
    PresenceUser[]

    The people, in display order (put the current user first or last). { id, name, avatar?, color?, status?, lastSeen?, activity?, typing? }; status defaults to online. Duplicate ids: the last one wins, with a warning in development.

  • maxdefault 4
    number

    Avatars shown before the +N chip. When only one would hide, it shows instead of a +1. Fine up to a few hundred people: only max avatars render, the list renders every row (no virtualization).

  • sizedefault "sm"
    "xs" | "sm" | "md" | "lg"

    Avatar size, 24 / 32 / 40 / 48px. Every size keeps a 44px hit area on touch screens.

  • indicatordefault "ring"
    "ring" | "dot" | "none"

    ring: a 2px ring in the person's color, dashed amber while away, red while busy, none while offline. dot: the avatar's status dot. none: plain avatars. The status is also in every avatar's spoken label.

  • overlapdefault "md"
    "sm" | "md" | "lg"

    How much neighbors overlap: 16 / 26 / 36% of the size (a little less with rings).

  • surfaceColordefault ""
    string

    The surface behind the stack, used for the rings that separate the avatars. Empty means var(--background); pass var(--surface) or var(--card) on a panel. Sets --presence-surface.

  • showOfflinedefault false
    boolean

    Keeps offline people in the stack, dimmed and grayscale. Off, they only appear in the list.

  • summarydefault false
    boolean

    A line after the stack from labels.summary: "Emma, Michael and 3 others are here". Counts everyone who is not offline; wraps to two lines at most on narrow screens.

  • currentUserIddefault ""
    string

    Marks you with labels.you ("You") in the list and the spoken label, and is what hideSelf leaves out. The playground picks a teammate id.

  • hideSelfdefault false
    boolean

    Leaves the current user out of the stack. The list still shows you.

  • showListdefault true
    boolean

    The +N chip, and any avatar when there is no onUserClick, opens the full list: a popover on desktop, a bottom sheet below 768px. Off, +N is a plain count.

  • tooltipsdefault true
    boolean

    The name, status and activity on hover and keyboard focus (a long press on touch).

  • responsivedefault true
    boolean

    The list becomes a bottom sheet below 768px.

  • aligndefault "end"
    "start" | "center" | "end"

    Which edge of the stack the list popover lines up with on desktop. end suits a stack in the top-right of a header; it shifts to stay on screen either way.

  • defaultOpendefault false
    boolean

    Starts with the list open (uncontrolled).

  • open
    boolean

    Controls the list; pair it with onOpenChange.

  • onOpenChange
    (open: boolean) => void

    Fires when the list opens or closes.

  • onUserClick
    (user: PresenceUser) => void

    Clicking an avatar (or a list row) calls this instead of opening the list, e.g. to jump to that person's cursor. +N still opens the list.

  • now
    Date | number

    The reference time for last seen. Defaults to the live clock (useNow, once a minute); until it is known after hydration, times print as dates.

  • localedefault ""
    string

    Locale for last seen times. Empty uses UIProvider's locale, then the page's.

  • labels
    Partial<PresenceLabels>

    Every string: group "People here", more(n) "+n", morePeople(n) "n more people", summary(names, rest), you, unknown, online, away, busy, offline, here "Here now", idle "Away or busy", lastSeen(text) "Seen {text}", at, typing(names). DEFAULT_PRESENCE_LABELS has the English set.

  • classNames
    Partial<Record<"avatar" | "ring" | "overflow" | "summary" | "popover" | "list" | "group" | "row" | "self", string>>

    Extra classes for the inner parts.

  • className
    string

    Extra classes for the root, merged last.

Parts

  • PresenceList

    component

    The list the popover shows, exported for side panels: rows with the avatar and its status dot, the name (and a You chip), the activity, and the status word or last seen. Grouped here now, away or busy, offline. Props: { users; currentUserId?; grouped? = true; onUserClick?; now?; locale?; labels?; classNames? }.

  • TypingIndicator

    component

    Pass only the people typing. text: three rising dots and "Julia is typing…" (two names, then "Several people are typing…"); dots: the dots alone; bubble: the dots in a chat bubble. role="status", polite; lingers 400ms after the list empties. Reads UIProvider defaults as "typing-indicator". Props: { users; variant?: "dots" | "text" | "bubble" = "text"; showAvatars? = true; size?: "sm" | "md" | "lg" = "md"; surfaceColor?; labels?; classNames? }.

  • PresenceCursor

    component

    One live cursor: an arrow in the person's color with a white (dark mode: black) outline and a name chip with black or white text by contrast. New x / y feed a spring (no re-render per frame); it fades out when hidden or outside its container, and the chip fades to the arrow after idleAfter ms (0 never). Reads UIProvider defaults as "presence-cursor". Props: { user; x; y; label?; mode?: "spring" | "instant" = "spring"; idleAfter? = 5000; hidden?; color?; showName? = true }.

  • PresenceCursors

    component

    A pointer-events-none layer (absolute inset-0) over a relative container, one PresenceCursor per { userId, x, y, label? }. relative: x and y are 0 to 1 of the container. Decorative (aria-hidden); the list says who is here. Props: { cursors: CursorPosition[]; users: PresenceUser[]; relative?; mode?; idleAfter?; showNames? = true; classNames? }.

  • LastSeen

    component

    A <time> with "Seen 5 min ago", "Seen yesterday at 6:20 PM", then the date; the full date and time in its title. The wording comes from labels.lastSeen. Props: { value; now?; locale?; labels?; prefix? = true }.

  • presenceColor

    function

    The user's color, else the stable avatarColor(name): the ring, the cursor and the chip use it. Signature: (user: { name; color? }) => string.

  • DEFAULT_PRESENCE_LABELS

    constant

    The English labels, to spread under your own. Type: PresenceLabels.

Examples

Sizes and indicators

xs to lg, and ring (dashed amber away, red busy), the avatar's status dot, or nothing.

Summary text

A custom labels.summary after the stack: who is looking at the quote right now.

Typing indicator

text, dots and bubble with one, two and four people; the names come from labels.typing.

Live cursors

Move over the board: your pointer comes back as Michael's cursor 250ms later, gliding on a spring.

Who is here, as a list

PresenceList in a side panel: online first, then away or busy, then offline with the last time seen.

Offline people in the stack

showOffline keeps offline people in the stack, dimmed and without a ring.

Dependencies

motionavatartooltippopoverrelative-timeuse-localeuse-controllable-stateuse-media-querymotiontonesui-config

Files

  • components/ui/presence.tsx

FAQ

Is the React Presence component free?

The preview, props and docs are free; copying the source needs a Pro plan. See plans.

How do I install Presence?

Run npx wingo-ui@latest add presence. It also adds the Wingo UI items it builds on (Avatar, Tooltip, Popover, Relative time, useLocale and 5 more) and the npm package motion. With shadcn, add the @wingo-ui registry with your API key, then run npx shadcn@latest add @wingo-ui/presence.

How does Presence behave on phones?

The list becomes a bottom sheet below 768px. The responsive prop controls this and is on by default.

See also

AvatarRelative timelibChat ThreadTooltipPopover

Used in

Chat WidgetInbox PageProfile Page

More React data display components

SchedulerTagTimelineTree ViewKbdBadge
All 23 React data display components
PreviousMarkdownNext Scheduler

Invoice

Invoice #2026-0412

Tech Solutions LLC · Austin, TX

  • Acme CRM Business license

    12 users × 12 months

    $8,640

  • Setup and data migration

    24 hours × $120

    $2,880

  • Sales team training

    one session, at the client's office

    $960

Subtotal
$12,480
Sales tax 8.875%
$1,108
Total due
$13,588
Julia is typing…
Add a comment…

showList: on · tooltips: on · responsive: on