X Enterprises
nuxt-x-affiliate

Social Proof Toast

Rotating recent-activity toast driven by real, timestamped events.

Social Proof Toast

A corner toast cycling through recent activity — "Jamie R. bought the Model X · 4 minutes ago".

events is required and has no default. The marketing component this was ported from shipped three invented notifications as its default value, so dropping it onto a page immediately displayed purchase activity that never happened. On a site earning affiliate commission that is a deceptive representation under the FTC Act and the Endorsement Guides (16 CFR §255) — the same rules requiring the disclosures the rest of this layer renders.Pass real events. An empty array renders nothing.

Components

<XAFSocialProofToast />

<XAFSocialProofToast :events="events" placement="bottomLeft" />

<script setup>
// Real, timestamped, and anonymised by you before it reaches the component.
const { data: events } = await useFetch('/api/recent-activity')
</script>

Props

PropTypeDefaultDescription
eventsSocialProofEvent[]requiredReal activity to cycle through
intervalnumber12000Time from one toast appearing to the next (ms)
initialDelaynumber5000Delay before the first toast (ms)
displayDurationnumber5000How long each toast stays on screen (ms)
placement'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight''bottomLeft'Corner
showIconbooleantrueShow the verified check icon
oncebooleanfalseStop after every event has shown once

SocialProofEvent object

KeyTypeDescription
namestringWho — anonymise before passing, e.g. "Jamie R."
actionstringWhat they did, e.g. "bought the Model X"
atstringISO timestamp of when it actually happened
avatarstringOptional photo. Falls back to a monogram
hrefstringOptional link to the product involved

Events

EventPayloadDescription
dismiss—Visitor closed the toast; cycling stops for the session

Tips

  • at is an ISO timestamp formatted live through useXafDateFormat, not a frozen string. The marketing original took time: "2 minutes ago" as a literal, which still claimed "2 minutes ago" a year later.
  • Announces via role="status", not role="alert" — ambient information should not interrupt a screen reader mid-sentence every few seconds.
  • The slide transform is dropped under prefers-reduced-motion; only opacity animates.

AI Context

component: XAFSocialProofToast
package: "@xenterprises/nuxt-x-affiliate"
use-when: Rotating recent-activity toast backed by real event data
Copyright © 2026