Skip to content
Theme:

Ui3nEditable

Inline editable text component. Click on the text to enter edit mode, press Enter or click the checkmark to confirm, press Escape or click the cross to cancel.

Props

NameTypeDefaultDescription
idstring | undefined

Root element id

namestring | undefined

HTML name attribute for form submission

modelValue*string

Current value of the editable content

placeholderstring | undefined

Placeholder text

maxLengthnumber | undefined

Maximum length of the text

maxWidthstring | number | undefined

Maximum width of the component

tooltipWidthnumber | undefined

Tooltip width

disabledboolean | undefined

Component disabled flag

selectAllOnFocusboolean | undefined

Flag for automatic selection of all text on focus

disallowEmptyValueboolean | undefined

Flag to prevent empty values

Events

Event NameArguments / Value TypeDescription
update:modelValuevalue: Nullable<string>
done
cancel
focusinvalue: FocusEvent
focusout
toggle:editModevalue: boolean

Public Methods & Exposes

Method NameSignature / TypeDescription
clear()() => void

Usage Examples

Basic usage

Basic usage

Click on the text to enter edit mode. Press Enter to confirm or Escape to cancel.

Editable text
Current value: Editable text

Disallow empty value

Disallow empty value

Using disallowEmptyValue prop prevents saving an empty value. The input border turns red when the value is empty.

Required field
This field cannot be empty (disallowEmptyValue)

Disabled state

Disabled state

Disabled component does not allow entering edit mode.

Disabled field
Disabled state — editing is not available