For AI agents: the complete documentation index is available at https://wallarm.github.io/design-system/llms.txt, the full documentation bundle is available at https://wallarm.github.io/design-system/llms-full.txt, and this page is available as Markdown at https://wallarm.github.io/design-system/components/inline-edit.md.

InlineEdit

Turns a displayed value into its own editor, so a reader can correct one field without opening a form — reach for a form when several values change together. Every story composes it inside an Attribute, because that is what keeps the read and edit states the same height and stops the row jumping on toggle.

Source · Storybook

Usage

import { Attribute, AttributeLabel, AttributeValue } from '@wallarm-org/design-system/Attribute';
import { InlineEdit, InlineEditControl, InlineEditError, InlineEditInput, InlineEditPreview } from '@wallarm-org/design-system/InlineEdit';

Examples

Number editor

InlineEditNumber for a numeric field, with the steppers available while editing and gone again once committed.

Textarea editor

For a value long enough to wrap. lineClamp on the preview keeps the row short in read mode and lets the editor grow past it.

Select editor

InlineEditSelect for a value from a known set. Its children are ordinary Select parts, so the menu behaves exactly as it would standalone.

Multi select editor

The same editor with multiple, for a value that is genuinely a list rather than one choice.

Tags editor

A multi-select whose committed value reads as Tag chips, which suits a list the reader scans rather than one they read as a sentence.

Date editor

InlineEditDate hosts a Calendar, so the editor is a popover rather than a field — the row stays the same height while it is open.

Time editor

InlineEditTime for a time of day, taking the same value objects as TimeInput.

Date time editor

Date and time in one editor, for a value where the pair only makes sense together.

Horizontal layout

InlineEdit inside a horizontal Attribute — label on the left, value/editor on the right. The orientation belongs to Attribute, not here: InlineEdit has no orientation prop and behaves identically either way.

States

The three async states side by side. saved is transient and clears itself after savedDuration, so it is pinned here to be looked at.

Async

A commit that returns a promise. The field stays in edit mode until it resolves, and a rejection keeps the reader's text rather than discarding it.

Non editable

readOnly and disabled are different answers: read-only shows the value plainly with no affordance, disabled says there is a control here that you cannot use.

Confirm commit

onBeforeValueCommit intercepts the commit — return false, or a promise of it, to hold the field open. Use it where the change is consequential enough to confirm, not for validation, and short-circuit unchanged values: the guard fires on every commit path, no-op submits included.

Props

PropTypeDefaultDescription
valueT | undefined
defaultValueT | undefined
onValueChange((value: T) => void) | undefined
onValueCommit((value: T) => void | Promise<unknown>) | undefined
onValueRevert((value: T) => void) | undefined
onBeforeValueCommit((value: T, committedValue: T) => boolean | void | Promise<boolean | void>) | undefinedCommit guard. Called on every submit (Enter, blur, popover close, confirm button) before onValueCommit, with the draft to be committed and the current committed value. Only an explicit false (or a promise resolving to false) blocks the commit: the field silently stays in edit mode with the draft. Any other result — true, undefined, no return — lets the commit proceed. A rejection or a synchronous throw is treated like a commit failure: status error, message from the error, field stays in edit mode. While the guard's promise is pending the edit session is held: duplicate submits are suppressed, blur neither submits nor cancels, and the field shows no status (idle — the consumer's confirmation UI is the feedback). Escape still cancels; a late resolution after cancel is dropped. The value committed on true is exactly the value argument the guard received; if the draft changed while the guard was pending, the resolution is dropped and the field stays in edit mode. Guards must settle via non-blocking UI (a promise resolved by dialog buttons). Synchronous blocking dialogs (window.confirm) are unsupported with submitMode 'blur'/'both' (the queued blur re-prompts). The guard's owner never gets its consumer UI closed by the DS — treat the dialog's own buttons as the source of truth for closing it.
editboolean | undefined
defaultEditboolean | undefined
onEditChange((editing: boolean) => void) | undefined
activationModeInlineEditActivationMode | undefined
submitModeInlineEditSubmitMode | undefined
selectOnFocusboolean | undefined
statusInlineEditStatus | undefined
savedDurationnumber | undefined
disabledboolean | undefined
readOnlyboolean | undefined
data-testidstring | undefined

InlineEditControl

PropTypeDefaultDescription
submitModeInlineEditSubmitMode | undefinedExplicit render-time submit mode for this editor session. Highest precedence (beats editor registrations and the root prop) — the escape hatch for custom editors that cannot call useInlineEditSubmitMode.
showActionsboolean | undefinedtrueShow floating action buttons (submit/cancel) below the input. Provides a mouse-clickable alternative to Enter/Escape keyboard shortcuts.
titlestring | undefined
defaultCheckedboolean | undefined
defaultValuestring | number | readonly string[] | undefined
autoFocusboolean | undefined
idstring | undefined
tabIndexnumber | undefined
relstring | undefined
onChangeChangeEventHandler<T, Element> | undefined

InlineEditError

PropTypeDefaultDescription
titlestring | undefined
defaultCheckedboolean | undefined
defaultValuestring | number | readonly string[] | undefined
autoFocusboolean | undefined
idstring | undefined
tabIndexnumber | undefined
relstring | undefined
onChangeChangeEventHandler<T, Element> | undefined

InlineEditInput

PropTypeDefaultDescription
titlestring | undefined
patternstring | undefined
defaultCheckedboolean | undefined
defaultValuestring | number | readonly string[] | undefined
autoFocusboolean | undefined
idstring | undefined
tabIndexnumber | undefined
relstring | undefined
typeHTMLInputTypeAttribute | undefined
disabledboolean | undefined
namestring | undefined
size{ default: string; medium: string; small: string; 'inline-edit': string; }inline-edit
altstring | undefined
data-testidstring | undefined
heightstring | number | undefined
srcstring | undefined
widthstring | number | undefined
autoCompleteHTMLInputAutoCompleteAttribute | undefined
maxLengthnumber | undefined
minLengthnumber | undefined
placeholderstring | undefined
readOnlyboolean | undefined
requiredboolean | undefined
checkedboolean | undefined
stepstring | number | undefined
acceptstring | undefined
maxstring | number | undefined
minstring | number | undefined
multipleboolean | undefined

InlineEditNumber

PropTypeDefaultDescription
formstring | undefinedThe associate form of the input element.
titlestring | undefined
patternstring | undefinedThe pattern used to check the <input> element's value against
defaultCheckedboolean | undefined
defaultValuestring | undefinedThe initial value of the input when rendered. Use when you don't need to control the value of the input.
autoFocusboolean | undefined
idstringThe unique identifier of the machine.
tabIndexnumber | undefined
relstring | undefined
inputModeInputMode | undefinedHints at the type of data that might be entered by the user. It also determines the type of keyboard shown to the user on mobile devices
onChangeChangeEventHandler<T, Element> | undefined
disabledboolean | undefinedWhether the number input is disabled.
namestring | undefinedThe name attribute of the number input. Useful for form submission.
asChildboolean | undefinedUse the provided child element as the default rendered element, combining their props and behavior.
size{ default: string; medium: string; small: string; 'inline-edit': string; }inline-edit
data-testidstring | undefined
idsElementIds | undefinedThe ids of the elements in the number input. Useful for composition.
readOnlyboolean | undefinedWhether the number input is readonly
requiredboolean | undefinedWhether the number input is required
stepnumber | undefinedThe amount to increment or decrement the value by
maxnumber | undefinedThe maximum value of the number input
minnumber | undefinedThe minimum value of the number input
translationsIntlTranslations | undefinedSpecifies the localized strings that identifies the accessibility elements and their states
largeStepnumber | undefinedThe amount to increment or decrement the value by when the Shift key is held.
smallStepnumber | undefinedThe amount to increment or decrement the value by when the Alt key is held.
allowMouseWheelboolean | undefinedWhether to allow mouse wheel to change the value
allowOverflowboolean | undefinedWhether to allow the value overflow the min/max range
clampValueOnBlurboolean | undefinedWhether to clamp the value when the input loses focus (blur)
focusInputOnChangeboolean | undefinedWhether to focus input when the value changes
formatOptionsIntl.NumberFormatOptions | undefinedThe options to pass to the Intl.NumberFormat constructor
onValueInvalidcomplexFunction invoked when the value overflows or underflows the min/max range
onFocusChangecomplexFunction invoked when the number input is focused
onValueCommitcomplexFunction invoked when the value is committed (when the input is blurred or the Enter key is pressed)
spinOnPressboolean | undefinedWhether to spin the value when the increment/decrement button is pressed
localestring | undefinedThe current locale. Based on the BCP 47 definition.

InlineEditPreview

PropTypeDefaultDescription
tooltipReactNodeEditTooltip shown on hover/focus while the value is editable. Defaults to 'Edit'. Pass null to disable the tooltip.
lineClamp1 | 2 | 3 | 4 | 5 | 6 | undefinedClamp the read-mode value to this many lines (with an ellipsis) instead of the default single-line truncation. Use for multi-line values (textarea). Applies to the default (no-parts) composition; when composing InlineEditPreviewValue explicitly, set lineClamp on it directly.
defaultCheckedboolean | undefined
defaultValuestring | number | readonly string[] | undefined
autoFocusboolean | undefined
idstring | undefined
tabIndexnumber | undefined
titlestring | undefined
relstring | undefined
onChangeChangeEventHandler<T, Element> | undefined

InlineEditPreviewValue

PropTypeDefaultDescription
lineClamp1 | 2 | 3 | 4 | 5 | 6 | undefinedClamp the read-mode value to this many lines (with an ellipsis) instead of the default single-line truncation. Use for multi-line values (textarea).

InlineEditSelect

PropTypeDefaultDescription
itemsSelectDataItem[] | undefinedOptions; the collection is built internally (PaginationPageSize precedent). Provide exactly one of items / collection.
collectioncomplexA prebuilt collection (e.g. built once upstream, or with custom filtering/sorting). Provide exactly one of items / collection — a dev-only warning fires otherwise.
multipleboolean | undefinedfalse

InlineEditTextarea

PropTypeDefaultDescription
titlestring | undefined
defaultCheckedboolean | undefined
defaultValuestring | number | readonly string[] | undefined
autoFocusboolean | undefined
idstring | undefined
tabIndexnumber | undefined
relstring | undefined
disabledboolean | undefined
namestring | undefined
size{ small: string; medium: string; default: string; 'inline-edit': string; }inline-edit
data-testidstring | undefined
autoCompletestring | undefined
maxLengthnumber | undefined
minLengthnumber | undefined
placeholderstring | undefined
readOnlyboolean | undefined
requiredboolean | undefined
minRowsnumber | undefined
maxRowsnumber | undefined

InlineEditTime

PropTypeDefaultDescription
titlestring | undefined
defaultCheckedboolean | undefined
defaultValueTimeValue | null | undefined
autoFocusboolean | undefined
idstring | undefined
tabIndexnumber | undefined
relstring | undefined
disabledboolean | undefinedWhether the input is disabled. Prevents user interaction.
namestring | undefined
sizeTemporalInputSize | undefinedinline-editVisual size. Default: 'default' (36px).
data-testidstring | undefined
errorboolean | undefinedWhether the input has an error state. Sets aria-invalid and error styling.
placeholderstring | undefinedPlaceholder shown when no value is selected.
readOnlyboolean | undefinedWhether the input is read-only. Segments are focusable but not editable.
showIconboolean | undefinedfalseWhether to show the leading icon. Default: true.
minValueTimeValue | undefined
maxValueTimeValue | undefined
placeholderValueTimeValue | undefined
isRequiredboolean | undefinedMarks the field as required in assistive tech and HTML form validation.
showTimeDropdownboolean | undefinedtrueShow dropdown for time selection with arrow navigation.
timeStepnumber | undefinedTime interval in minutes for dropdown options. Default: 30.
granularityTimeInputGranularity | undefinedminuteSmallest editable unit. - 'hour': hours only - 'minute': hours and minutes (default) - 'second': hours, minutes, and seconds

Explorer