Item
One row of a list — a medium, a title, a description, and something to do about it — for rows that differ from one another.
Default
The shape a list row settles into: a medium on the left, a title with its description, and the actions that apply to that row on the right. `ItemGroup` stacks them and `ItemSeparator` rules between — the boundary around the set belongs to whatever holds it, not to the rows. Reach for `default` inside something that already draws a boundary — a card, a panel, a ruled group, the bordered surface below — where a second border would be a box in a box.
Ran 14 minutes ago — 1,204 contacts imported, 3 skipped for a missing email.
Drafting 40 messages. Paused sends until the sending domain verifies.
Failed at 03:12 — the destination bucket rejected the credentials.
Usage
import {
Item,
ItemActions,
ItemContent,
ItemDescription,
ItemFooter,
ItemGroup,
ItemHeader,
ItemMedia,
ItemSeparator,
ItemTitle,
} from '@oceanic-hub/brand-system'<ItemGroup>
<Item>
<ItemMedia>…</ItemMedia>
<ItemContent>
<ItemTitle>…</ItemTitle>
<ItemDescription>…</ItemDescription>
</ItemContent>
<ItemActions>…</ItemActions>
</Item>
<ItemSeparator>…</ItemSeparator>
</ItemGroup>Composition
Use the following composition to build an Item:
ItemGroup
├── Item ×3
│ ├── ItemMedia
│ ├── ItemContent
│ │ ├── ItemTitle
│ │ └── ItemDescription
│ └── ItemActions
└── ItemSeparator ×2
Item
├── ItemContent
│ ├── ItemTitle
│ └── ItemDescription
├── ItemHeader
├── ItemMedia
├── ItemFooter
└── ItemActionsThree exports here draw a horizontal thing with text in it, and picking the wrong one
stays invisible until a second surface disagrees with the first. The test is what the row is,
not what it looks like: if the row can be invalid it is a Field, because only a form
control has a validity state; if every row shares one header it is a DataTable, columns
and all; otherwise it is an Item. The fourth option — a hand-drawn div — is the drift all
three replace, and it is why this component exists: the same row was being redrawn inside
TimelineFeed, NotificationBell and every settings surface, at a slightly different set of
gaps each time.
A row becomes navigable through asChild and never through an href prop. The package
imports no router, so a bare href would work in one host and be wrong in the next; the host
supplies its own a or Link and the row slots onto it. The hover wash follows: it keys on
the href that lands on the slotted child, so a row that navigates lights up and a row that
merely sits there does not.
One accessibility caveat, inherited rather than chosen. ItemGroup carries
role="list" and an Item carries no role="listitem" — upstream's shape, kept for
parity. Some assistive tech announces that as a list of zero items. If the membership of a group
matters to a reader who cannot see it, put the count in the group's accessible name; do not
reach for the role on individual rows, which would leave an Item used outside a group as an
orphan.
Upstream un-grows a second content column automatically, so a right-hand metadata block sits at
its natural width. That hook is dropped here on purpose: it is one className="flex-none" at
the call site, and every mechanism for doing it invisibly was worse than the override.
RTL is not supported, the same refusal Accordion records: nothing in this package has
been laid out or measured right-to-left, and upstream's RTL example is not ported because
advertising support we have not measured is the failure mode this repo refuses everywhere else.
Outline
outline gives each row its own 1px hairline, the package's only elevation, for rows that float on the page as peers rather than sitting inside something that already draws one.
A 1px hairline, which is the whole of this package’s elevation vocabulary.
Muted
muted recesses the row instead of raising it: the same trick a quoted block uses, for a row that is context rather than content.
The recessed ground — the row sits under the page rather than on top of it.
Sizes
Two densities, and the choice is whether the row carries a description. The default has room for one under the title, which is the feed row; sm tightens the gaps for a list a reader scans rather than reads — settings, connected sources, a picker. There is deliberately no third step: a denser list than sm is a table, and a looser one is a card.
Room for a description under the title — the feed row, the activity row.
Media
What goes on the left, and how much furniture it needs. icon gives the glyph a bordered plate, which is what keeps a column of mixed icons aligned; image is a thumbnail well whose ground does not flip with the theme, so a still that has not loaded reads as a well rather than a hole. default draws nothing at all — reach for it when the medium already is a shape, an Avatar being the usual one. The medium lifts and top-aligns itself as soon as the row has a description, so a two-line row does not centre its icon against the gap.
A plate under the glyph, so a column of different icons still lines up.
A thumbnail well. An image dropped inside fills it and crops to it.
No plate and no ground — the medium is whatever you put in it.
Header and footer
Both are full-width strips: the row wraps, so a full-basis child takes a line of its own and the medium, content and actions flow underneath. Reach for the header when the row needs a label it does not own — an eyebrow, a timestamp, the run it belongs to — and for the footer when the row has trailing metadata that would crowd the description.
Waiting on the daily cap to reset before the first send.
As a link
asChild hands the row's markup to whatever the host renders — an anchor here, a router link in a real app — so the package never has to know how this surface navigates. The hover wash keys on the href that lands on that child, which is why the second row below stays inert: it is a row that shows, not a row that goes.
Navigable: the whole row is the target, and it washes on hover.
No href, so no wash — nothing here goes anywhere.
With a menu
Put the overflow menu in ItemActions when a row has more to offer than fits beside it — and keep the one action a reader reaches for most as its own button, because a menu costs a click before it shows anything. Do not combine this with a navigable row: a menu trigger inside a link is a target inside a target, and the outcome of a click stops being predictable.
Syncing every hour. Last run finished 12 minutes ago.
API Reference
See the Item API page for every prop of every part, with types, defaults and the contract that pins them. It also documents itemMediaVariants and itemVariants — exported alongside the parts, and signatures rather than props.