Inline editing can replace a traditional form when the user only needs to update a few fields among many available parameters.

Country
Capital
Currency

In a horizontal list, you can adjust the column width of the parameter name and set it to either a fixed or relative value.

Country
Capital
Currency
Text Field
Textarea
Select Multiple
Select

Parameters should never appear as blank in view mode. Instead, use placeholder text to signal that a field can be edited.

By default, the system displays “Not filled”, but it’s better to use contextual messages for clarity. For example: Responsible: Not assigned, End date: Not specified.

For fields without labels, the placeholder can include the field name, e.g., Description: Not provided, Operator: Not set, Incident type: Not defined.

Country
Capital
Currency

Exiting edit mode attempts to save changes. An invalid value is never written through: the editor stays open and the field is highlighted, while focus stays wherever the interaction left it.

The error message is opt-in. Pass validationTooltip to get the red tooltip the example below shows — without it nothing is displayed, and a kbq-error inside the form field is the alternative. showTooltipOnError switches the tooltip off again without dropping the message.

Validation is run against the control itself rather than against its error styling, so a value the user never touched is rejected as well — a select that commits from (selectionChange) cannot write an invalid option through.

Not empty
IP-address

When certain characters are always invalid (e.g., letters in an IP address), block their input directly. Prevented characters do not appear, and a yellow tooltip explains why.

If the user clears a value, you can substitute either a default value or the last valid entry to avoid errors.

The component owns the loading state: it closes the editor, keeps the timings, updates its own status and remembers the last saved value. Connect the stream of the request to the saveHandler property for that.

View mode renders the control's value: the editor closes before the server answers.

If the value still equals the one the editor opened with, no request is sent. compareWith decides that: the default compares with ===, which suits text and numbers, so bind your own for arrays and objects, or null to send every time. A failed save is always retried.

The request outlives the field — removing the row doesn't cancel it. Provide KBQ_INLINE_EDIT_SAVE_ERROR_HANDLER in the root injector if a failure has to be reported after that, because the saveError output goes away with the view.

If the server responds within 100 ms, don't show a loading indicator. Otherwise, the field in view mode switches to the Progress state for at least 300 ms to avoid flickering. Edit mode cannot be reopened while the request is in flight.

Server response time
Name
Description

The value's background turns into the error color and stays that way until the user reacts. The entered value is kept in the field.

The message is shown by the application: set the shared reaction with the KBQ_INLINE_EDIT_SAVE_ERROR_HANDLER token, override it for a single field with the saveErrorHandler property, or subscribe to the field's saveError output. The handler receives the error and the field itself, with its retrySave(), toggleMode() and rollback() actions.

The message doesn't hide on a timeout, and closing or dismissing it discards the unsaved value.

Cancelling the editor doesn't clear the failed state: the value is still the one the server refused, so the field stays marked until the save succeeds or rollback() discards it.

Save Admins, Support as the name to have the value rejected. Saving the description fails on the first attempt and succeeds on retry.

Name
Description

When the server rejects part of the value rather than all of it, match the rejected items against what view mode shows and mark only those.

Add user:delete, user:update to the roles to have the server reject them.

Roles

On hover or focus, an action button or menu can appear on the right side of the field: copy text, add value to filter, clear field, fill from template.

These actions are visually separated from the main value and placed in the top-right corner. When the menu is open, both the highlight and the icon remain visible.

Vertical list
Style
Founded
Horizontal listStyle
Founded

The editor can be opened and closed programmatically: bind [(mode)] and set it to 'edit' or 'view'.

Spanish football is characterized by technical skill, tactical innovation, and fierce regional rivalries. La Liga, founded in 1929, features some of the world's best clubs. Spain's national team dominated world football from 2008-2012, winning two European Championships and a World Cup with their 'tiki-taka' style.

Inline-editable elements should remain aligned with their appearance in view mode. Do not account for extra padding or spacing that may appear when the element is hovered, focused, or in edit mode.

Parameters with inline editing are visually left-aligned with other elements on the screen
Country
Capital
Currency
Tags
Critical
High
Medium
Low
Icon + Text

On selection, open only the dropdown menu — don't show a bordered input field like Select's. The field doesn't need a border of its own, the dropdown alone is enough.

Status
Priority

After picking an option, the field returns to view mode.

Sometimes it's worth making the dropdown options multiline. It's recommended to match the dropdown's width to the field's width.

Resolution comment

Place the clear element inside the dropdown menu — since the select field itself isn't visible, there's no other suitable place for a reset button.

Also recommended: add an option whose label makes it clear that no value is set. This echoes the wording used for the empty field in view mode.

Assignee

After picking an option, the field returns to view mode.

The field is a single tab stop.

Key
ModeWhat it does
Enter / SpaceViewOpen the editor
EnterEditSaves the value and returns the field to view mode, except on buttons
EscEditCloses the editor and reverts the value
TabEditOff the first or last control, saves the value and leaves the field
EnterEdit, inside a textareaInserts a line break
Ctrl / Cmd + EnterEdit, inside a textareaSaves the value; the canSaveOnEnter input replaces this rule

A click outside saves the value and closes the editor the same way Tab does. Leaving edit mode returns focus to the field — except on Tab, which hands it to the tab stop next to the field, in the direction of travel. When that tab stop belongs to another inline edit, its editor opens, so a column of fields can be filled in one pass; when there is none, the field takes focus back.

A control with an Enter action of its own — a button, or anything with role="button" — runs that action instead of saving, so one keypress does not do both. A field whose saveHandler request is still in flight keeps its tab stop and its focus ring: unlike a disabled one it stays reachable, it just will not reopen yet.

Content that handles clicks itself — a link, a tag — keeps its own behaviour instead of opening the editor. interactiveSelectors is the list that decides, ['a', 'kbq-tag'] by default; it replaces the list rather than extending it, so repeat the defaults you still want. Once the view holds such content, the field's own tab stop moves to a visually hidden control beside it, so both the content and the editor stay reachable.

The view mode is announced as a button carrying aria-expanded, so assistive technology reports both that the value is editable and whether the editor is open. Its name defaults to the localized "Edit"; give the field a specific one with aria-label wherever the projected value alone does not say what is being edited:

<kbq-inline-edit aria-label="Assignee">…</kbq-inline-edit>

A disabled field reports aria-disabled and stays out of the tab order. The icon-only save and cancel buttons of showActions take their names from the a11y locale section, alongside the edit name above.

A background save is not conveyed by color alone: the field announces it from a visually hidden role="status" region, wording it with the saving and saveFailed keys of the same locale section.

An element carrying kbqInlineEditMenu is stamped role="button" and is not named by the library, so give it an aria-label of its own.

Inline edits should be saved immediately after a change—without requiring a global Save button.

Avoid using inline editing when:

  • Inside traditional forms.
  • Creating new entities (use a form instead).
  • Fields require complex validation (e.g., password, email, uniqueness checks, input masks, or guided hints).
  • Fields are dependent on each other (use a form when one change affects others).
  • Editing critical or sensitive data.
  • Saving requires additional confirmation (e.g., “Are you sure?” dialogs).

Alternatives to inline editing:

  • A modal or popover with a form — for complex or multi-line data.
  • A dedicated edit page — when more control over input is required.
  • An inline form — when the field should expand into a larger editor.
Suggestions for improvement
If you found a mistake or want to improve the article, create an issue on GitHub.