Click-to-edit field for quietly mutable values — names, titles, short descriptions.
InlineEdit is a single-line click-to-edit affordance. Use it for values that occasionally change in place (settings rows, table cells, header titles) where a full form would feel heavy.
Click the value to enter edit mode; press Enter to save or Escape to cancel.
<InlineEdit defaultValue="Untitled board" />import { InlineEdit } from "@froggdesign/enter-ui-react";<InlineEdit
value={name}
loading={saving}
onSave={async (next) => {
setSaving(true);
try {
await rename(next);
setName(next);
} finally {
setSaving(false);
}
}}
/>Return a string from validate to surface an inline error and block the save. Returning null / undefined keeps the value valid. Set multiline to render a textarea.
<InlineEdit
defaultValue=""
validate={(value) => (value.trim().length === 0 ? "Required" : null)}
onSave={save}
/>When the field has no visible label, pass ariaLabel so screen readers can identify it. Errors are announced via role="alert". Keyboard: Enter commits (single-line) and triggers onSave, Escape discards the draft and exits edit mode, Tab behaves natively.
value, defaultValue, onSave, onCancel, placeholder, disabled, loading, validate, multiline, defaultEditing.ariaLabel, label, editLabel, saveLabel, cancelLabel.Every exported component accepts className. EnterUI styles use .eui-* classes and --eui-* variables mapped from FroggDesign theme tokens.