npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-table-cell.json --yesTable cell
ProOne cell of a data table: a value, optionally with an icon or a picture before it, inside a row, for React and Tailwind CSS. Part of Goop Pro.
What an agent sees
- TableCellLabelThe words in a cell, a value in a body row or a column's name in the header row
- TableCellSortA column's sort control
- TableCellButtonA control a body cell holds — a count that opens what it counts
- TableCellValueA name people edit in place, a button that looks like words
- TableCellIndicatorThe box for a colour dot before the cell's name
- TableCellIndicatorDotThe colour dot inside TableCellIndicator, red unless you give it a colour of your own
- TableCellPersonA person in a body cell
import { TableCellIndicator, TableCellIndicatorDot } from '@/components/ui/goop/table-cell';
import { useState } from 'react';
import { Table, TableBody, TableHead, TableHeader, TableRow } from '@/components/ui/goop/table';
import {
TableCell,
TableCellButton,
TableCellLabel,
TableCellPerson,
TableCellSort,
type TableSort,
TableCellValue,
} from '@/components/ui/goop/table-cell';
function Moderators() {
const [way, setWay] = useState<TableSort>('descending');
return (
<Table aria-label="Moderators">
<TableHeader>
<TableRow>
<TableCell variant="header">
<TableCellLabel>Member</TableCellLabel>
</TableCell>
<TableHead numeric sorted={way}>
<TableCellSort onClick={() => setWay(way === 'ascending' ? 'descending' : 'ascending')}>
Sessions
</TableCellSort>
</TableHead>
<TableHead>Role</TableHead>
<TableHead align="end">Notes</TableHead>
</TableRow>
</TableHeader>
<TableBody>
<TableRow>
<TableCell>
<TableCellPerson name="Teodora Valk" description="teodora@fieldwork.test" />
</TableCell>
<TableCell numeric>
<TableCellLabel>12</TableCellLabel>
</TableCell>
<TableCell>
<TableCellValue placeholder="Add a role" />
</TableCell>
<TableCell align="end">
<TableCellButton aria-label="3 notes">3</TableCellButton>
</TableCell>
</TableRow>
</TableBody>
</Table>
);
}Lay the amount column at the end, sort it either way or not at all, cut a long name or wrap it, leave a value empty; point at a cut name to read it whole. The rows do not reorder: the sort control only counts (the table example sorts for real).
When to use
- One cell of a data table: a value, optionally with an icon or a picture before it, inside a row.
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 Table cell 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.
npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-table-cell.json --yesAdd the Goop Table cell to this project. The install steps are at https://goop.so/docs/install.mdUsage
import { TableCellIndicator, TableCellIndicatorDot } from '@/components/ui/goop/table-cell';
import { useState } from 'react';
import { Table, TableBody, TableHead, TableHeader, TableRow } from '@/components/ui/goop/table';
import {
TableCell,
TableCellButton,
TableCellLabel,
TableCellPerson,
TableCellSort,
type TableSort,
TableCellValue,
} from '@/components/ui/goop/table-cell';
function Moderators() {
const [way, setWay] = useState<TableSort>('descending');
return (
<Table aria-label="Moderators">
<TableHeader>
<TableRow>
<TableCell variant="header">
<TableCellLabel>Member</TableCellLabel>
</TableCell>
<TableHead numeric sorted={way}>
<TableCellSort onClick={() => setWay(way === 'ascending' ? 'descending' : 'ascending')}>
Sessions
</TableCellSort>
</TableHead>
<TableHead>Role</TableHead>
<TableHead align="end">Notes</TableHead>
</TableRow>
</TableHeader>
<TableBody>
<TableRow>
<TableCell>
<TableCellPerson name="Teodora Valk" description="teodora@fieldwork.test" />
</TableCell>
<TableCell numeric>
<TableCellLabel>12</TableCellLabel>
</TableCell>
<TableCell>
<TableCellValue placeholder="Add a role" />
</TableCell>
<TableCell align="end">
<TableCellButton aria-label="3 notes">3</TableCellButton>
</TableCell>
</TableRow>
</TableBody>
</Table>
);
}- height, width, padding, gap, corner, border, background, text, motion: add no class for these.
API reference
| Option | Type | What it does |
|---|---|---|
| variant | default | header = default | |
| asChild? | boolean = false | Render the cell's look on the one child element instead of a td (a td or th of your own). |
| numeric? | boolean = false | A column of numbers (amounts, counts): its figures one width each, laid at the column's end; give its head the same. |
| align? | 'start' | 'end' = 'start' | Where the cell lays what it holds: start (the default), or end, on the column's end edge (a row's actions menu); give the column's head the same, so its words end on that edge too. |
| wrap? | boolean = false | Wrap the cell's words onto more lines (the row grows) instead of holding them on one line. |
| Part | What it is |
|---|---|
| TableCellLabel | The words in a cell, a value in a body row or a column's name in the header row; primary?: boolean = false — The row's main item: the words in the medium weight and the text colour |
| TableCellSort | A column's sort control; its props: table-cell--sort.md |
| TableCellButton | A control a body cell holds — a count that opens what it counts; also takes type?: 'button' | 'submit' | 'reset'; onClick?: (event: MouseEvent) => void; disabled?: boolean; loading?: boolean = false; loadingLabel?: string = 'Loading' |
| TableCellValue | A name people edit in place, a button that looks like words; with placeholder its words are a hint; its props: table-cell--value.md |
| TableCellIndicator | The box for a colour dot before the cell's name; put one TableCellIndicatorDot in it |
| TableCellIndicatorDot | The colour dot inside TableCellIndicator, red unless you give it a colour of your own |
| TableCellPerson | A person in a body cell; its props: table-cell--person.md |
- Class recipes (cva): tableCellVariants (TableCell)
TableCellPerson
A person in a body cell.
import { TableCellPerson } from '@/components/ui/goop/table-cell';Options
- name: string — The person's name: the first line, and the avatar's initials and colour unless
initialsor a colour is given. - description?: ReactNode — The second line: the person's email or role, in the grey.
- orientation?: 'vertical' | 'horizontal' = 'vertical' —
verticalthe name over the second line;horizontalthe two on one line, a dot between them. - image?: string — The person's picture; the initials show until it loads, and in its place if it fails.
- initials?: string — The avatar's letters, where the name's initials are wrong.
- hue?: 'blue' | 'green' | 'orange' | 'pink' | 'red' | 'yellow' | 'neutral' — A fixed avatar colour in place of the one taken from the name (
neutral: the theme's grey). - fill?: string — The avatar's own fill, any CSS colour (the person's own colour); wins over
hue. - shape?: 'circle' | 'square' = 'circle' — The avatar's shape:
circle(the default) for a person,squarefor a company (a supplier, a client). - href?: string — The name as a link to the person (their profile, their record).
- children?: ReactNode — With
asChild: the one element the name is drawn on. - Also takes: asChild?: boolean
TableCellSort
A column's sort control.
import { TableCellSort } from '@/components/ui/goop/table-cell';Options
- sorted?: TableSort — The column the rows are ordered by, and which way: the column header's unless given here.
- Also takes: type?: 'button' | 'submit' | 'reset'; onClick?: (event: MouseEvent) => void; disabled?: boolean; loading?: boolean = false; loadingLabel?: string = 'Loading'
TableCellValue
A name people edit in place, a button that looks like words; with placeholder its words are a hint.
import { TableCellValue } from '@/components/ui/goop/table-cell';Options
- placeholder?: string — The words while the value is empty (no children): a hint in the placeholder grey.
- Also takes: type?: 'button' | 'submit' | 'reset'; onClick?: (event: MouseEvent) => void; disabled?: boolean
Keyboard
| Key | What it does |
|---|---|
| Tab | Move to the next control a cell holds: a column head's sort, a row's editable value, its count |
| Enter Space | On a column head's sort, press it (the caller orders the rows and sets its head's sorted); on an editable value, open it; on a count, open what it counts |
Accessibility
- The native element answers the keyboard.
- hover, active, focus-visible: the browser's own (:hover, :active, :focus-visible): write nothing
Its states are drawn from attributes and props, so assistive technology and your agent read the same thing:
| State | Drawn by |
|---|---|
| disabled | the prop disabled |
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.