Theme
Install with your agentnpx shadcn@4.23.1 add @goop/trail-item

Item

Free

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

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.

Terminal
npx shadcn@4.23.1 add @goop/trail-item
PROMPT
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
OptionTypeWhat it does
variantdefault | ghost | line | outline = default
sizemd | sm = md
Parts
PartWhat it is
ItemGroupA list of Item rows with ONE hover wash that glides from row to row under the pointer and the keyboard's focus
ItemOverlayAn invisible control over the whole row that makes it clickable; name it with aria-label
ItemControlA line row's selection slot
ItemMediaA tile or a picture at the row's start
ItemContentThe column of words after the media; put an ItemTitle in it, then an optional ItemDescription
ItemTitleThe row's main words, first in ItemContent, on one line cut with an ellipsis
ItemDescriptionThe line under the title
ItemLabelsA row's labels, in its ItemContent after the title (and before a line row's assignee mark)
ItemTextPlain words at the row's end (a role, a count)
ItemEndThe row's trailing meta at its end edge, after ItemContent (and before ItemActions, if the row has one)
ItemActionsThe 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

KeyWhat it does
EnterFollow

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.

goop.so/themes/trail/components/item.md · the page as Markdown

Where would you like to start?

Free · now

The Goop plugin

A design system for your AI coding agent, so screen ten matches screen one.

/plugin marketplace add goop-so/skillsthen /plugin install goop@goopCodex, Cursor, ChatGPT, the Claude app and more: Connect Goop
FreePro

The components

Every part live, with its props, its keys and what an agent sees. Whole page and app templates, working with sample data.