Prodular UI

Inputs

Inline editPro

Edit text, numbers, choices and dates where they are shown, with async saving, validation errors and a saved confirmation, without opening a form.

npx prodular-ui add inline-edit

Part of Prodular UI Pro. Preview and read the docs freely, install with a license. See pricing

Record details

Click a value to edit. Enter or leaving the field saves, Escape cancels. Try renaming the customer to Kestrel Health to see a server error.

Customer
Seats
Account owner
Renews
Notes

In a table

Status and due date change in place. Pickers save as soon as a choice is made.

InvoiceCustomerStatusDue
INV-2104Northwind Logistics
INV-2103Kestrel Health
INV-2101Meridian Freight

Anatomy

<InlineEdit  type="select"  label="Account owner"  value={owner}  options={owners}  onSave={async (v) => { await api.update({ owner: v }); setOwner(v) }}/>

Guidance

Use it when

  • Detail panels and tables where people change one field at a time: owner, status, due date, a name.
  • type select and date for fields with a fixed set of values; they save on choice, no confirm step.

Avoid

  • Several fields that must change together or be checked together. Use a form with a Save button.
  • Long text. Use a Textarea in a form or a dedicated editor.

Rules for AI agents

Published in llms-full.txt and the registry, so coding agents follow them when they build with this component.

  • Always pass label naming the field (Due date, Account owner). It becomes the accessible name of the trigger and the field.
  • Make onSave async and return a message string (or throw) when the server rejects the value; the field stays in edit mode and shows it.
  • Only update your state after the save succeeds, inside onSave, so the shown value is always the saved one.
  • Use validate for checks that need no server, like required text.
  • Give empty fields a placeholder that invites action: Add a due date, Assign an owner.

API

InlineEdit

PropTypeDefaultDescription
type"text" | "number" | "select" | "date""text"Which editor opens.
valuestring | number | Date | nullThe saved value, matching the type.
onSave(value) => void | string | Promise<void | string>Persist the value. Return a message or throw to reject it.
labelstringThe field's name for assistive tech.
placeholderstringShown when the value is empty.
validate(value) => string | nullText only. Client-side check before saving.
min / max / step / format / unit / localenumber propsNumber only. Passed to Number input.
options{ value, label }[]Select only.
locale / formatDate / disabledDatesdate propsDate only. How the date reads and which days can be picked.