---
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. Part of Goop Pro.

Pro. 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 a 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. 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>/meadow-item.json --yes
```

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

## Usage

```tsx
import { ItemReorderGroup, ItemHandle, ItemDescription, ItemLabels, ItemText, ItemActions } from '@/components/ui/goop/item';

import { Badge } from '@/components/ui/goop/badge';
import { Checkbox } from '@/components/ui/goop/checkbox';
import {
  Item,
  ItemContent,
  ItemControl,
  ItemEnd,
  ItemGroup,
  ItemMedia,
  ItemOverlay,
  ItemTitle,
} from '@/components/ui/goop/item';

const NOTES = [
  { id: 'drainage', title: 'North Field Drainage Plan', unread: true },
  { id: 'samples', title: 'Soil Samples Check-In', unread: false },
];

function NotesList() {
  return (
    <ItemGroup asChild>
      <ul>
        {NOTES.map((note) => (
          <Item key={note.id} unread={note.unread} asChild>
            <li>
              <ItemOverlay asChild>
                <a href={`/notes/${note.id}`} aria-labelledby={`note-${note.id}`} />
              </ItemOverlay>
              <ItemMedia variant="image">
                <img src={`/notes/${note.id}/preview.png`} alt="" className="size-4" />
              </ItemMedia>
              <ItemContent>
                <ItemTitle id={`note-${note.id}`}>{note.title}</ItemTitle>
              </ItemContent>
            </li>
          </Item>
        ))}
      </ul>
    </ItemGroup>
  );
}

function MeetingRow({ onOpen }: { onOpen: () => void }) {
  return (
    <Item variant="ghost" asChild>
      <button type="button" onClick={onOpen}>
        <ItemEnd>25 Nov 26</ItemEnd>
        <ItemContent><ItemTitle>Seed Order Review</ItemTitle></ItemContent>
        <Badge variant="tag">Note</Badge>
      </button>
    </Item>
  );
}

function TodoRow({ onOpen }: { onOpen: () => void }) {
  return (
    <Item variant="todo">
      <ItemOverlay aria-labelledby="todo-fence" onClick={onOpen} />
      <ItemControl reveal={false}><Checkbox aria-labelledby="todo-fence" /></ItemControl>
      <ItemContent><ItemTitle id="todo-fence">Walk the north fence line</ItemTitle></ItemContent>
      <ItemEnd><Badge>Dec 2</Badge></ItemEnd>
    </Item>
  );
}
```

- Fits: list, overview (their recipes).
- A list of rows is an `ItemGroup` round them (`asChild` on the caller's `ul`, each row `asChild` on an `li`); a row that opens its record holds an `ItemOverlay` on the record's link, named by its title. A `line` row is one line with no second line of words: its ItemDescription is the record's short id.
- More on where it goes: item--options.md
- height, width, padding, gap, corner, background, shadow, text, motion: add no class for these.

## API reference

### Options

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

- Each option with its sentence: item--options.md

### Parts

- `ItemGroup` — A list of Item rows
- `ItemReorderGroup` — A list the reader puts in order
- `ItemHandle` — A row's drag handle, first in a row of an `ItemReorderGroup`
- `ItemOverlay` — An invisible control over the whole row that makes it clickable; name it with aria-label
- `ItemControl` — A row's selection slot (a `line` row's first)
- `ItemMedia` — A tile or a picture at the row's start (in a list row a 28 px box it is centred in)
- `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
- `ItemDescription` — The line under the title
- `ItemLabels` — A row's labels (a Badge each, the caller's: `variant="plain"`, the grey label chip), in its `ItemContent` after the title, as one run 6 px apart, each kept whole
- `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.

### 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 row's selection slot (a `line` row's first).

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

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

### Options

- Also takes: asChild?: boolean

### ItemHandle

A row's drag handle, first in a row of an `ItemReorderGroup`.

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

### Options

- value: string — The row's id, as it stands in the list's `value`.
- label: string — The row's name (its title), for the handle's name and what each move says.
- Also takes: type?: 'button' | 'submit' | 'reset'; onClick?: (event: MouseEvent) => void; disabled?: boolean

### ItemLabels

A row's labels (a Badge each, the caller's: `variant="plain"`, the grey label chip), in its `ItemContent` after the title, as one run 6 px apart, each kept whole.

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

### Options

### ItemMedia

A tile or a picture at the row's start (in a list row a 28 px box it is centred in).

```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 record's labels go in `ItemLabels` after its title, never loose in ItemContent or ItemActions. A time or value that must stay whole on a phone goes in ItemEnd or ItemActions, which never shrink: the title is cut instead. A `todo` row holds an `ItemOverlay` that opens the to-do (named by its title), its `Checkbox` in an `ItemControl reveal={false}` (shown at rest, named by the title too), its title, then its marks and date chips (`Badge`s, pack icons with a name) in one `ItemEnd`.
- ItemReorderGroup: The order is the caller's: `value` (the rows' ids, in order) and `onValueChange`, which every step of a move calls (render the rows in `value`'s order, each keyed by its id); `onValueCommit` is called once when a move ends in a new order (save there). Each row holds an `ItemHandle` first, with its id and its title as `label`, and the list leaves 32 px of room before its rows for the handles (`ps-8` on a holder). `<ItemReorderGroup value={order} onValueChange={setOrder} onValueCommit={save} asChild><ul>{order.map((id) => <Item key={id} asChild><li><ItemHandle value={id} label={titles[id]} /><ItemContent><ItemTitle>{titles[id]}</ItemTitle></ItemContent></li></Item>)}</ul> </ItemReorderGroup>`.
- ItemActions: Two or more buttons go straight in one ItemActions, side by side (`<ItemActions><Button variant="outline" size="sm">Decline</Button><Button size="sm">Accept</Button></ItemActions>`), never in a `div` of yours inside it or a second ItemActions.

### Options

- variant: default (default), ghost, line, todo, 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: a 6 px accent dot in the row's leading gutter, level with the title's line, and the title in the strong weight; the row and its stretched control (`ItemOverlay`) are described as `unreadLabel` to a reader.
- unreadLabel?: string = 'Unread' — What an unread row says to a reader, as its description (default "Unread").

### 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-labelledby` is required.
- Also takes: asChild?: boolean; type?: 'button' | 'submit' | 'reset'; onClick?: (event: MouseEvent) => void; disabled?: boolean

### ItemReorderGroup

A list the reader puts in order.

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

### Options

- value: readonly string[] — The rows' ids in the order they stand.
- onValueChange: (value: string[]) => void — A new order, at every step of a move (and the old one back when Escape cancels it).
- onValueCommit?: (value: string[]) => void — The order a move ended in, once, when it differs from the order the move began in.
- messages?: Partial<ItemReorderMessages> — What the list says to a reader, in your language: any of `ItemReorderMessages`.
- Also takes: asChild?: 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.

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

### Options

- Also takes: asChild?: boolean

## Keyboard

- Enter: follow

## Accessibility

- The native element answers the keyboard.

## Motion

- The part sets its own motion: add no transition or animation of your own.

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

## Related

- [Badge](/themes/meadow/components/badge): A small label with a word, an icon or a count, for a status, a tag, a date or a count beside a title or in a row.
- [Checkbox](/themes/meadow/components/checkbox): A round box a person ticks to mark one thing done or chosen.
- [List group](/themes/meadow/components/list-group): A group of a list's rows under a header bar with its name and count that folds open and closed, such as to-dos by project.
- [Empty](/themes/meadow/components/empty): An empty state, what a view or a section shows when it holds nothing yet, with a line of help and an action to add the first item.
