---
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/"
---

# Item

One row of a list of records, for React and Tailwind CSS. Free, MIT.

Free. Its export: `Item`.

## Try it

In the list look, press a row to open its project (it shows under the card); tick the box at its start to select it and archive several at once; Archive at a row’s end, shown under the pointer or the keyboard, takes that row away. Bring them all back after. Look draws every other look of the item the theme’s docs stage shows: on Trail the row alone in its card, the session rows, the dimmed row, the inbox, count, status, record and table rows; on Meadow the notes list, the linked, record and standing rows, the people, task and value rows, the reordered day, the meeting rows and the to-do row.

The projects are our own sample; archiving only hides them in the page.

## When to use

- One row of a list of records.

## When not to use

- For records in columns use Table.

## 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 Item on every screen instead of drawing a new one: the same height, the same focus ring, the same spacing.

```sh
npx shadcn@4.23.1 add @goop/trail-item
```

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

## Usage

```tsx
import { Item, ItemGroup, ItemOverlay, ItemControl, ItemMedia, ItemContent, ItemTitle, ItemDescription, ItemLabels, ItemText, ItemEnd, ItemActions } from '@/components/ui/goop/item';
import { Card } from '@/components/ui/goop/card';
import { Avatar } from '@/components/ui/goop/avatar';
import { StatusMark } from '@/components/ui/goop/status-mark';
import { Badge, BadgeLabel } from '@/components/ui/goop/badge';

<>
  <Card variant="outline">
    <Item unread>
      <ItemContent>
        <ItemTitle>Tags vanish after a sync on tablets</ItemTitle>
        <ItemDescription>Bilal Rashed commented on FW-121</ItemDescription>
      </ItemContent>
      <ItemEnd>
        19 Nov
        <Avatar variant="solid" size="xs" name="Yuto Sakamaki">
          YS
        </Avatar>
      </ItemEnd>
    </Item>
  </Card>
  <ItemGroup asChild>
    <ul>
      {[
        { id: "FW-9", title: "Interview notes lose their tags after a sync", labels: ["Bug"] },
        { id: "FW-1108", title: "Export a study as a shareable file", labels: ["Feature", "Design"] },
      ].map((issue) => (
        <Item key={issue.id} variant="line" asChild>
          <li>
            <ItemOverlay asChild>
              <a href={`/issues/${issue.id}`} aria-labelledby={`title-${issue.id}`} />
            </ItemOverlay>
            <ItemMedia variant="mark">
              <StatusMark status="in-progress" />
            </ItemMedia>
            <ItemDescription>{issue.id}</ItemDescription>
            <ItemContent>
              <ItemTitle id={`title-${issue.id}`}>{issue.title}</ItemTitle>
              <ItemLabels>
                {issue.labels.map((label) => (
                  <Badge key={label} variant="outline">
                    <BadgeLabel>{label}</BadgeLabel>
                  </Badge>
                ))}
              </ItemLabels>
            </ItemContent>
            <ItemActions>20 Nov</ItemActions>
          </li>
        </Item>
      ))}
    </ul>
  </ItemGroup>
</>
```

- Fits: overview, inbox, record (their recipes).
- More on where it goes: item--options.md

## API reference

### Options

- `variant: default | ghost | line | outline = default`
- `size: md | sm = md`

- Each option with its sentence: item--options.md
- Another example of it: priority-mark.md, progress-circle.md

### Parts

- `ItemGroup` — A list of Item rows with ONE hover wash that glides from row to row under the pointer and the keyboard's focus
- `ItemOverlay` — An invisible control over the whole row that makes it clickable; name it with aria-label
- `ItemControl` — A line row's selection slot
- `ItemMedia` — A tile or a picture at the row's start
- `ItemContent` — The column of words after the media; put an ItemTitle in it, then an optional ItemDescription
- `ItemTitle` — The row's main words, first in ItemContent, on one line cut with an ellipsis
- `ItemDescription` — The line under the title
- `ItemLabels` — A row's labels, in its `ItemContent` after the title (and before a line row's assignee mark)
- `ItemText` — Plain words at the row's end (a role, a count)
- `ItemEnd` — The row's trailing meta at its end edge, after `ItemContent` (and before `ItemActions`, if the row has one)
- `ItemActions` — The row's end, never shrinking

- Class recipes (cva): itemVariants (Item), itemMediaVariants (ItemMedia)

### ItemActions

The row's end, never shrinking.

```tsx
import { ItemActions } from '@/components/ui/goop/item';
```

### Options

- reveal?: boolean = false — A pointer behaviour: hidden at rest, shown under the row's pointer and press, while the focus is inside it, and while a menu it opened is open; shown at rest on a touch screen.

### ItemContent

The column of words after the media; put an ItemTitle in it, then an optional ItemDescription.

```tsx
import { ItemContent } from '@/components/ui/goop/item';
```

### Options

### ItemControl

A line row's selection slot.

```tsx
import { ItemControl } from '@/components/ui/goop/item';
```

### Options

- reveal?: boolean = true — The box hidden until the pointer, the keyboard or a check (the default; shown at rest on a touch screen); `false` shows it at rest.

### ItemDescription

The line under the title.

```tsx
import { ItemDescription } from '@/components/ui/goop/item';
```

### Options

### ItemEnd

The row's trailing meta at its end edge, after `ItemContent` (and before `ItemActions`, if the row has one).

```tsx
import { ItemEnd } from '@/components/ui/goop/item';
```

### Options

### ItemGroup

A list of Item rows with ONE hover wash that glides from row to row under the pointer and the keyboard's focus.

```tsx
import { ItemGroup } from '@/components/ui/goop/item';
```

### Options

- Also takes: asChild?: boolean

### ItemLabels

A row's labels, in its `ItemContent` after the title (and before a line row's assignee mark).

```tsx
import { ItemLabels } from '@/components/ui/goop/item';
```

### Options

### ItemMedia

A tile or a picture at the row's start.

```tsx
import { ItemMedia } from '@/components/ui/goop/item';
```

### Options

- variant: default (default), image, mark
- dim?: boolean = false — A pointer behaviour: a line row's mark that dims under its own pointer and press (a status's, an assignee's; never a priority's).

### Item: every option

```tsx
import { Item } from '@/components/ui/goop/item';
```

### Compose

- A time or value that must stay whole on a phone goes in ItemActions, or, set straight in the row, takes `ItemText className="shrink-0"`.
- ItemActions: Two or more buttons go straight in one ItemActions, side by side, never in a `div` of yours inside it or a second ItemActions.

### Options

- variant: default (default), ghost, line, outline
- size: md (default), sm
- asChild?: boolean = false — Draw the row on the caller's own element (an `li`, or the link or button the whole row is).
- disabled?: boolean = false — A row that leads nowhere: its media and words at half, no grey under the pointer (give it no link).
- unread?: boolean = false — A record not yet seen: an accent dot in the row's leading gutter and the title in the strong weight, described as `unreadLabel` to a reader.
- unreadLabel?: string = 'Unread' — What an unread row says to a reader, as its description.
- Another example of it: priority-mark.md, progress-circle.md

### ItemOverlay

An invisible control over the whole row that makes it clickable; name it with aria-label.

```tsx
import { ItemOverlay } from '@/components/ui/goop/item';
```

### Options

- aria-label?: string — The row's name for assistive technology; this or `aria-labelledby` is required.
- aria-labelledby?: string — The id of the row's title, which names the row; this or `aria-label` is required.
- Also takes: asChild?: boolean; type?: 'button' | 'submit' | 'reset'; onClick?: (event: MouseEvent) => void; disabled?: boolean

### ItemText

Plain words at the row's end (a role, a count).

```tsx
import { ItemText } from '@/components/ui/goop/item';
```

### Options

- variant?: 'default' | 'destructive' = 'default' — The value's ink, in the theme's status words: `default` the row's grey, `destructive` the red of a value that warns.

### ItemTitle

The row's main words, first in ItemContent, on one line cut with an ellipsis.

```tsx
import { ItemTitle } from '@/components/ui/goop/item';
```

### Options

- Also takes: asChild?: boolean

## Keyboard

- Enter: follow

## Accessibility

- The native element answers the keyboard.

## Responsive behaviour

- A `line` row is one line with no second line of words: its ItemDescription is the record's short id and never shrinks, so a sentence there pushes the title out and runs under the row's end on a phone. A title over a line of words, with a Badge at the end, is the default row (its rows in a `Card variant="outline"`) or the `ghost` row. A record's labels go in `ItemLabels` after its title, never loose in ItemContent or ItemActions (ItemLabels folds them under the title on a phone).

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

Shortened to fit: the data-slot values, how each state is put on, the states, what the part already sets.

## Related

- [Table](/themes/trail/components/table): A data table of records compared across columns, with a header row whose columns can sort.
- [Card](/themes/trail/components/card): A framed surface that holds one piece of content or a list of settings rows.
- [Avatar](/themes/trail/components/avatar): A person's or a team's picture or initials, beside their name or on its own.
- [Status mark](/themes/trail/components/status-mark): A small icon that shows an item's status, such as to do, in progress or done, in a list, a board or a record.
