InlineEdit
v1.0.3NewUpdated 28 Sept 2026Click-to-edit field: renders a committed value as text with a pencil affordance on hover/focus, and swaps to an input, textarea, or native select on activation. Enter or the check button confirms (Ctrl/Cmd+Enter in texta
Preview
Live · 12 stories▸Why this is recommendedinlineedit-in-placeclick-to-editasync+3
The default, out-of-the-box InlineEdit.
- ✓Detail-panel fields (invoice, customer, deal records)
- ✓Table-cell style quick edits without a modal
- ✓Settings values edited one at a time
- ✓Renaming things in place (documents, projects, line items)
- Read view is a real button with visible focus ring and hover/focus pencil affordance
- Three edit controls: input / textarea / select (with options array)
- Confirm on Enter or check button; cancel on Escape or X button
- Confirm-on-blur by default (or cancel-on-blur via confirmOnBlur={false})
- Async onConfirm with pending spinner and inline error (role="alert")
- Optimistic mode: commit + close immediately, revert on rejection
- Controlled (value/onValueChange) and uncontrolled (defaultValue) modes
- Three sizes (sm / default / lg)
- Key hints exposed via aria-describedby; saving announced via polite live region
- prefers-reduced-motion respected (motion-safe transitions and spinner)
- Labelled by FormField: id and aria-* move off the wrapper onto the read-view button (named "<value>, edit <field label>") and, while editing, onto the edit control; clicking the label starts editing
- ✕Multi-field forms (use Form + Input)
- ✕Rich text editing (use a rich-text editor)
- ✕Values needing complex pickers (use DatePicker / Combobox)
Install
Ask your agent, or call the MCP tool directly. The resolved bundle is written into your project.
Usage
Tick variants in the left menu — each adds a tab with that variant’s real story source, the same code the preview above renders.
Props
valueControlled committed value
—defaultValueUncontrolled initial value
—onValueChangeFires when the committed value changes
—onConfirmAsync confirm; rejection shows inline error (and reverts when optimistic)
—controlWhich edit control to render
—optionsOptions for control='select'
—labelAccessible name for the field and its edit controls
—optimisticCommit + close immediately, revert on rejection
—confirmOnBlurConfirm (default) or cancel when focus leaves the editor
—sizeSize scale
—placeholderMuted empty-value text and edit-control placeholder
—idDOM id set on the wrapper standalone; inside a FormField, the read-view button / edit control; FormField clones its field id in, and its label then names the control
—aria-labelledbyId(s) of the element(s) that label the controls inside a FormField; wins over a FormField label
—aria-describedbyId(s) of hint or error text describing the focusable element inside a FormField (FormField clones this in)
—aria-invalidMark the focusable element inside a FormField invalid; FormField clones this in from its error prop
—aria-requiredMark the edit control inside a FormField required; FormField clones this in from its required prop
—