The editable input is a container displaying text that is user-editable.

Example

⌘ Cmd + ⌥ Option + 1

Properties

propertypropTyperequireddefaultdescription
displayErrorbool-falseToggle error state styles
isEditingbool-falseDetermines if the component is in edit mode
labelstring-''Text that describes the input
onBlurfunc-noopFunction that fires when the input goes out of focus
onChangefunc-noopFunction that fires when the input loses focus after the value changes
onFocusfunc-noopFunction that fires when the input is focused
placeholderstring-''Placeholder for input
valuestring | number-''Text within the input
notestring--Append note near form input.
testSectionstring--Used for data-test-section attribute on the link
typeoneOf 'text' | 'password' | 'date' | 'number' | 'percent' | 'email' | 'url' | 'search' | 'tel'yes-Supported input types

Usage

Use this input to provide inline-editing for one or a few pieces of short user-submitted content.

Best Practices

Do

Do allow inline editing for short user-submitted values

Prefer inline editing to a single form field dialog

Don't

Don't include too many editable fields on one page, consider a sheet instead