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

Create row

Pro

A new item made in place in a list, for React and Tailwind CSS. Part of Goop Pro.

In the list look, press a group’s plus (or C with the focus in a group), type a title, pick a status or priority ("No priority" at the top of its list sets it back to none), and press Enter: the task grows in at the top of its group with a soft tint and the row stays ready for the next. Escape keeps what you typed for next time; Ctrl/Cmd+Z in the empty row takes the last task out again. In the table look, the interviews table’s New row opens a row at the table’s foot: Tab walks its cells, Enter adds the interview in its sorted place. The error look shows a row whose save the server refused. The tasks are our own sample, held in the page; nothing is saved.

When to use

  • A new item made in place in a list.

When not to use

  • For a full form use a dialog.

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 Create row 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-create-row.json --yes
PROMPT
Add the Goop Create row to this project. The install steps are at https://goop.so/docs/install.md

Usage

TSX
import { useCreateLanding, TableCreateRow, CreateRowTitle, CreateRowActions } from '@/components/ui/goop/create-row';

import { useState } from 'react';
import { CreateRow, useCreateRow } from '@/components/ui/goop/create-row';
import { Item, ItemContent, ItemTitle } from '@/components/ui/goop/item';
import {
  ListGroup,
  ListGroupAction,
  ListGroupContent,
  ListGroupHeader,
  ListGroupTitle,
} from '@/components/ui/goop/list-group';

function CrewTodos() {
  const [todos, setTodos] = useState([{ id: 1, title: 'Check the path markers' }]);
  const create = useCreateRow({
    noun: 'To-do',
    onCreate: ({ title }) => {
      const id = Date.now();
      setTodos((all) => [{ id, title }, ...all]);
      return id;
    },
    onUndo: (id) => setTodos((all) => all.filter((todo) => todo.id !== id)),
  });
  return (
    <ListGroup
      onAdd={() => create.start()}
      createRow={<CreateRow {...create.row} label="New to-do" placeholder="Add a to-do for the crew" />}
    >
      <ListGroupHeader action={<ListGroupAction icon="plus" aria-label="Add a to-do" />}>
        <ListGroupTitle>Today</ListGroupTitle>
      </ListGroupHeader>
      <ListGroupContent>
        {todos.map((todo) => (
          <Item key={todo.id} variant="line" {...create.landed(todo.id)}>
            <ItemContent>
              <ItemTitle>{todo.title}</ItemTitle>
            </ItemContent>
          </Item>
        ))}
      </ListGroupContent>
    </ListGroup>
  );
}
  • Fits: list (its recipe); list: foot.
  • Also known as: InlineCreate, QuickAdd, AddRow, NewItemRow, InlineAddForm.
  • Reach for it where a list makes its own items: a group's plus, a list page's "New task" open it in place, pre-filled with the group's values, and Enter leaves it ready for the next. A create that needs a description, many properties or an attachment is a dialog's, never this row's.
  • TableCreateRow: Reach for it where a table makes its records one after another (a ledger, line items); a record that needs more than a line of fields is a dialog's. Your editors read and set create.values (create.setValue(name, value)); onCreate receives { title, summary, values }, and the row stays open, the title emptied, the values kept.
  • height, width, padding, gap, corner, border, background, text, motion: add no class for these.

API reference

Options
OptionTypeWhat it does
Defaultsopen = true
  • Each option with its sentence: create-row--options.md
  • Types: UseCreateLandingOptions = { onUndo?: (key: string | number, draft: D) => void | PromiseLike<unknown>; onView?: (key: string | number) => void; noun?: string; toasterId?: string }
Parts
PartWhat it is
TableCreateRowA table's row to create a record in place, at its body's foot; its props: create-row--table-create-row.md
CreateRowTitleThe title field of a table's create row, in its first cell; its props: create-row--title.md
CreateRowActionsCancel and Create of a table's create row, in its last cell (<TableCell align="end">); its props: create-row--actions.md
useCreateLandingThe create row's landing, for an item a dialog makes
useCreateRowThe create row's state and the landing of what it creates
  • data-slot values (to select a part by): create-row, create-row-action, create-row-actions, create-row-cancel, create-row-content, create-row-description, create-row-end, create-row-error, create-row-group, create-row-icon, create-row-retry, create-row-status, create-row-title, create-row-title-field, table-create-row, table-create-row-trigger

CreateRowActions

Cancel and Create of a table's create row, in its last cell (<TableCell align="end">).

TSX
import { CreateRowActions } from '@/components/ui/goop/create-row';

Options

  • createLabel?: string = 'Create' — The words of the create button.
  • cancelLabel?: string = 'Cancel' — The words of the cancel button.
  • restoredLabel?: string = 'Draft restored' — The words that say a kept draft was put back.
  • discardLabel?: string = 'Discard' — The words of the button that empties a restored draft.

CreateRow: every option

TSX
import { CreateRow } from '@/components/ui/goop/create-row';

Options

  • label: string — The row's name, read on the row and its title field ("New task").
  • icon?: IconName = 'plus' — The leading glyph, by the pack's name: the pack's plus by default.
  • hideIcon?: boolean = false — Draw no leading glyph (the bare new-item field): the title starts on the box's 12 px inset.
  • placeholder?: string — The title's placeholder ("Task title").
  • summaryPlaceholder?: string — Draws the summary field after the title, with this placeholder.
  • chips?: ReactNode — The property chips, after the words: the theme's Selects on a SelectTrigger shape="chip".
  • createLabel?: string = 'Create' — The words of the create button.
  • cancelLabel?: string = 'Cancel' — The words of the cancel button.
  • restoredLabel?: string = 'Draft restored' — The words that say a kept draft was put back.
  • discardLabel?: string = 'Discard' — The words of the button that empties a restored draft.
  • retryLabel?: string — The words of a failed save's retry (Try again).
  • Defaults: open = true

TableCreateRow

A table's row to create a record in place, at its body's foot.

TSX
import { TableCreateRow } from '@/components/ui/goop/create-row';

Options

  • label: string — The row's name, read on the row and its title field ("New entry").
  • onStart?: () => void — Opens the row: the closed row's button calls it (create.start()).
  • startLabel?: string = 'New row' — The closed row's button's words.
  • children: ReactNode — One TableCell per column: the first holding CreateRowTitle, the last CreateRowActions, the others your editors.

CreateRowTitle

The title field of a table's create row, in its first cell.

TSX
import { CreateRowTitle } from '@/components/ui/goop/create-row';

Options

  • retryLabel?: string — The words of a failed save's retry (Try again).
  • Also takes: defaultValue?: string; name?: string; required?: boolean; disabled?: boolean; form?: string

Accessibility

  • The native element answers the keyboard.
  • hover, focus: the browser's own (:hover, :focus): write nothing

Its states are drawn from attributes and props, so assistive technology and your agent read the same thing:

StateDrawn by
focus-visiblethe attribute data-focus-visible
invalidthe attribute data-invalid

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/create-row.md · the page as Markdown
Theme
Install with your agentnpx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-create-row.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.