A list row that is unread, with its date at the end

1 min readWritten for your agentMarkdown

Never draw an unread dot, a bold title or a trailing date by hand. Item unread sets the accent dot in the row's start gutter and the title in the strong weight, and tells a reader "Unread" (unreadLabel in another language); read and unread rows lay out alike. ItemEnd holds a date, a count or an avatar at the row's end, on one line: on a phone the title is cut instead. A value that warns (failed, overdue) is ItemText variant="destructive" in ItemActions.

Show the code27 lines
TSX
import { Card } from '@/components/ui/goop/card';
import { CardList } from '@/components/ui/goop/card-list';
import {
  Item,
  ItemContent,
  ItemDescription,
  ItemEnd,
  ItemOverlay,
  ItemTitle,
} from '@/components/ui/goop/item';

<Card variant="outline">
  <CardList aria-label="Updates" empty={{ title: 'No updates yet' }}>
    <Item asChild unread>
      <li>
        <ItemOverlay asChild>
          <a href="/updates/41" aria-labelledby="update-41" />
        </ItemOverlay>
        <ItemContent>
          <ItemTitle id="update-41">Tags vanish after a sync on tablets</ItemTitle>
          <ItemDescription>Bilal Rashed commented on FW-121</ItemDescription>
        </ItemContent>
        <ItemEnd>2h</ItemEnd>
      </li>
    </Item>
  </CardList>
</Card>;

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.