npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/trail-activity-item.json --yesActivity item
ProOne line of a record's history saying who changed what and when, for an activity feed, for React and Tailwind CSS. Part of Goop Pro.
What an agent sees
- ActivityItemMediaThe leading slot
- ActivityItemContentThe line's sentence
- ActivityItemActorHolds the actor's name link, first in ActivityItemContent, set in medium weight on one line
- ActivityItemNameThe name's words, inside the caller's link
- ActivityItemAsideThe trailing slot, after the ActivityItemContent
- ActivityItemBodyA comment's or an update's own words, after the sentence (and its aside)
- ActivityItemSeparatorThe dot between the words and the time
import {
ActivityItem, ActivityItemMedia, ActivityItemContent, ActivityItemActor, ActivityItemName, ActivityItemAside, ActivityItemBody, ActivityItemSeparator,
} from '@/components/ui/goop/activity-item';
import { Link } from '@/components/ui/goop/link';
import { Avatar, AvatarFallback } from '@/components/ui/goop/avatar';
<ul>
<ActivityItem asChild>
<li>
<ActivityItemMedia>
<Link variant="plain" href="/people/teodora" aria-label="Teodora Valk">
<Avatar variant="solid" size="3xs" name="Teodora Valk">
<AvatarFallback>TV</AvatarFallback>
</Avatar>
</Link>
</ActivityItemMedia>
<ActivityItemContent>
<ActivityItemActor>
<Link variant="muted" href="/people/teodora">
<ActivityItemName>Teodora Valk</ActivityItemName>
</Link>
</ActivityItemActor>{' '}
moved FW-121 to In review
<ActivityItemSeparator />
<Link variant="muted" href="#history">
2 hours ago
</Link>
</ActivityItemContent>
</li>
</ActivityItem>
<ActivityItem asChild>
<li>
<ActivityItemMedia>
<Link variant="plain" href="/people/bilal" aria-label="Bilal Rashed">
<Avatar variant="solid" size="3xs" name="Bilal Rashed">
<AvatarFallback>BR</AvatarFallback>
</Avatar>
</Link>
</ActivityItemMedia>
<ActivityItemContent>
<ActivityItemActor>
<Link variant="muted" href="/people/bilal">
<ActivityItemName>Bilal Rashed</ActivityItemName>
</Link>
</ActivityItemActor>{' '}
commented
</ActivityItemContent>
<ActivityItemAside>
<Link variant="muted" href="#comment-12">
12 min ago
</Link>
</ActivityItemAside>
<ActivityItemBody>
<p>Repro'd on my tablet. Only happens when the sync runs while a tag is open.</p>
</ActivityItemBody>
</li>
</ActivityItem>
</ul>Change who did it, what they did and when; drop the avatar; make the words long enough to wrap; press the person or the time. The links go nowhere: a press is only written under the line.
When to use
- One line of a record's history saying who changed what and when, for an activity feed.
When not to use
- For a conversation use ChatMessage.
Installation
Paste the prompt below into your coding agent. It reads Goop's install steps, installs the part and its tokens once, then reuses this same Activity item on every screen instead of drawing a new one: the same height, the same focus ring, the same spacing. As a Pro part, its command comes from Goop's server once you sign in, with a one-time link that lasts ten minutes.
npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/trail-activity-item.json --yesAdd the Goop Activity item to this project. The install steps are at https://goop.so/docs/install.mdUsage
import {
ActivityItem, ActivityItemMedia, ActivityItemContent, ActivityItemActor, ActivityItemName, ActivityItemAside, ActivityItemBody, ActivityItemSeparator,
} from '@/components/ui/goop/activity-item';
import { Link } from '@/components/ui/goop/link';
import { Avatar, AvatarFallback } from '@/components/ui/goop/avatar';
<ul>
<ActivityItem asChild>
<li>
<ActivityItemMedia>
<Link variant="plain" href="/people/teodora" aria-label="Teodora Valk">
<Avatar variant="solid" size="3xs" name="Teodora Valk">
<AvatarFallback>TV</AvatarFallback>
</Avatar>
</Link>
</ActivityItemMedia>
<ActivityItemContent>
<ActivityItemActor>
<Link variant="muted" href="/people/teodora">
<ActivityItemName>Teodora Valk</ActivityItemName>
</Link>
</ActivityItemActor>{' '}
moved FW-121 to In review
<ActivityItemSeparator />
<Link variant="muted" href="#history">
2 hours ago
</Link>
</ActivityItemContent>
</li>
</ActivityItem>
<ActivityItem asChild>
<li>
<ActivityItemMedia>
<Link variant="plain" href="/people/bilal" aria-label="Bilal Rashed">
<Avatar variant="solid" size="3xs" name="Bilal Rashed">
<AvatarFallback>BR</AvatarFallback>
</Avatar>
</Link>
</ActivityItemMedia>
<ActivityItemContent>
<ActivityItemActor>
<Link variant="muted" href="/people/bilal">
<ActivityItemName>Bilal Rashed</ActivityItemName>
</Link>
</ActivityItemActor>{' '}
commented
</ActivityItemContent>
<ActivityItemAside>
<Link variant="muted" href="#comment-12">
12 min ago
</Link>
</ActivityItemAside>
<ActivityItemBody>
<p>Repro'd on my tablet. Only happens when the sync runs while a tag is open.</p>
</ActivityItemBody>
</li>
</ActivityItem>
</ul>- Fits: record (its recipe).
- height, width, padding, gap, corner, background, text: add no class for these.
API reference
| Option | Type | What it does |
|---|---|---|
| asChild? | boolean = false | Render the line on the one child element instead of a div (a history list's li). |
| Part | What it is |
|---|---|
| ActivityItemMedia | The leading slot; put the actor's avatar link in it, centred at the start of the line |
| ActivityItemContent | The line's sentence; put the actor, the action's words, an ActivityItemSeparator and the time |
| ActivityItemActor | Holds the actor's name link, first in ActivityItemContent, set in medium weight on one line |
| ActivityItemName | The name's words, inside the caller's link |
| ActivityItemAside | The trailing slot, after the ActivityItemContent |
| ActivityItemBody | A comment's or an update's own words, after the sentence (and its aside) |
| ActivityItemSeparator | The dot between the words and the time |
- data-slot values (to select a part by): activity-item, activity-item-body, activity-item-content, activity-item-end, activity-item-media, activity-item-row, activity-item-separator, activity-item-title, activity-item-title-text
Accessibility
- hover, active: the browser's own (:hover, :active): write nothing
Notes for AI
Give your coding agent this page as text instead of screenshots: the parts, the options, the states and the keys. An agent that reads the real part builds the real part, not a lookalike.