---
agent:
  instructions: "Search goop.so for Goop's components, templates, design skill, docs, pricing and terms. Ask in keywords or a plain question, such as \"date picker props\" or \"is the design skill free\"; the answer is the matching page sections in Markdown, each with its address."
  endpoint: "https://goop.so/.well-known/search?q={query}"
  method: "GET"
  documentation: "https://developers.cloudflare.com/ai-search/how-to/search-for-agents/"
---

# Activity item

One 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.

Pro. Its export: `ActivityItem`.

## Try it

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.

```sh
npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/trail-activity-item.json --yes
```

```text
Add the Goop Activity item to this project. The install steps are at https://goop.so/docs/install.md
```

## Usage

```tsx
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

### Options

- `asChild?: boolean = false` — Render the line on the one child element instead of a `div` (a history list's `li`).

### Parts

- `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.

## Related

- [Chat message](/themes/trail/components/chat-message): One message of a conversation: its author, its body and when it was sent, often an avatar and actions.
- [Link](/themes/trail/components/link): A text link to another page or place, in running text or on its own.
- [Avatar](/themes/trail/components/avatar): A person's or a team's picture or initials, beside their name or on its own.
- [Chart container](/themes/trail/components/chart): The card a custom chart is drawn in, with its grid, axes, series markers, tooltip and legend.
