Theme
Install with your agentnpx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-table-cell.json --yes

Table cell

Pro

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

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.

Terminal
npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-table-cell.json --yes
PROMPT
Add the Goop Table cell to this project. The install steps are at https://goop.so/docs/install.md

Usage

TSX
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

Options
OptionTypeWhat it does
variantdefault | header = default
asChild?boolean = falseRender the cell's look on the one child element instead of a td (a td or th of your own).
numeric?boolean = falseA 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 = falseWrap the cell's words onto more lines (the row grows) instead of holding them on one line.
Parts
PartWhat it is
TableCellLabelThe 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
TableCellSortA column's sort control; its props: table-cell--sort.md
TableCellButtonA 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'
TableCellValueA name people edit in place, a button that looks like words; with placeholder its words are a hint; its props: table-cell--value.md
TableCellIndicatorThe box for a colour dot before the cell's name; put one TableCellIndicatorDot in it
TableCellIndicatorDotThe colour dot inside TableCellIndicator, red unless you give it a colour of your own
TableCellPersonA person in a body cell; its props: table-cell--person.md
  • Class recipes (cva): tableCellVariants (TableCell)

TableCellPerson

A person in a body cell.

TSX
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 initials or a colour is given.
  • description?: ReactNode — The second line: the person's email or role, in the grey.
  • orientation?: 'vertical' | 'horizontal' = 'vertical' — vertical the name over the second line; horizontal the 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, square for 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.

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

TSX
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

KeyWhat it does
TabMove to the next control a cell holds: a column head's sort, a row's editable value, its count
Enter SpaceOn 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:

StateDrawn by
disabledthe 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.

goop.so/themes/meadow/components/table-cell.md · the page as Markdown
Theme
Install with your agentnpx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-table-cell.json --yes

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.