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

Inline edit

Pro

Words that read as plain text and become an editable field in place, such as a record's title or a property's value, for React and Tailwind CSS. Part of Goop Pro.

Click the title, the site, the empty contact or the note (or Tab onto one and press Enter, Space or F2) and type: Enter or a click away saves, Escape puts the words back, and in the title and the note Shift+Enter breaks the line. The line under the record says what the last save or Escape did. The study is our own and lives in this page alone: nothing is saved anywhere.

When to use

  • Words that read as plain text and become an editable field in place, such as a record's title or a property's value.

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

Usage

TSX
import { useState } from 'react';
import { InlineEdit } from '@/components/ui/goop/inline-edit';
import { Progress } from '@/components/ui/goop/progress';
import { Properties, PropertyRow } from '@/components/ui/goop/properties';

function Visit() {
  const [title, setTitle] = useState('Survey the ridge path before the spring walk');
  const [place, setPlace] = useState('North meadow');
  return (
    <div className="flex w-80 flex-col gap-4">
      <InlineEdit as="h1" variant="title" multiline label="Title" value={title} onValueChange={setTitle} />
      <Properties>
        <PropertyRow label="Place">
          <InlineEdit value={place} onValueChange={setPlace} placeholder="Add a place" />
        </PropertyRow>
      </Properties>
    </div>
  );
}
  • Fits: record (its recipe).
  • Also known as: Editable, EditableText, ClickToEdit.
  • height, width, padding, corner, text, motion: add no class for these.

API reference

Options
OptionTypeWhat it does
variantdefault | title = default
value?stringThe saved words (controlled); pair it with onValueChange.
defaultValue?string = ''The words it starts with (uncontrolled).
onValueChange?(value: string) => voidCalled with the new words when a save changes them (Enter, or the focus leaving), never while typing.
onSave?(value: string) => voidCalled with the words on every save, changed or not, after onValueChange.
onCancel?() => voidCalled when Escape ends the editing and puts the saved words back.
label?stringWhat the value is, for a screen reader: the button reads "Edit <label>" and the field is named <label>.
placeholder?stringThe words shown, in the placeholder grey, while the value is empty; the field's own placeholder too.
multiline?boolean = falseA multi-line field (a textarea growing with its words): Enter saves, Shift+Enter breaks the line.
disabled?boolean = falseOff: the words read and nothing opens them.
as?'div' | 'span' | 'p' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' = 'div'The element round the words in both states: a div by default, h1 for a page's title.
id?stringThe control's id (the reading button's, then the field's): what a <label htmlFor> points at.
  • State: value (value / defaultValue / onValueChange)
  • Class recipes (cva): inlineEditVariants (InlineEdit)
  • data-slot values (to select a part by): inline-edit, inline-edit-input, inline-edit-text, inline-edit-trigger

Keyboard

KeyWhat it does
Enter Space F2On the words: open the field holding them, focused, the words chosen
EnterIn the field: save the words and put the focus back on them (Shift+Enter breaks the line in a multi-line field)
EscapeIn the field: put the saved words back and the focus on them; a dialog round it stays open
TabIn the field: save the words and move on to the next control

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