Leave Yamada UI a star

Star
Yamada UIYamada UIv1.7.2

Editable

Editable is a component used to obtain inline editable text input.

Source@yamada-ui/editable

Props

EditableInputProps

EditablePreviewProps

EditableProps

defaultValue

Description

The initial value of the Editable in both edit & preview mode.

Type

string

disabled

Description

If true, the form control will be disabled.

Type

boolean

Default

false

errorBorderColor

Description

The border color when the input is invalid.

Type

"border" | "link" | BorderColor | "amber.50" | "amber.100" | "amber.200" | "amber.300" | "amber.400" | "amber.500" | "amber.600" | "amber.700" | "amber.800" | "amber.900" | ... 319 more ... | [...]

focusBorderColor

Description

The border color when the input is focused.

Type

"border" | "link" | BorderColor | "amber.50" | "amber.100" | "amber.200" | "amber.300" | "amber.400" | "amber.500" | "amber.600" | "amber.700" | "amber.800" | "amber.900" | ... 319 more ... | [...]

invalid

Description

If true, the form control will be invalid.

Type

boolean

Default

false

isDisabled

Deprecated

Description

If true, the form control will be disabled.

Deprecated

Use disabled instead.

Type

boolean

Default

false

isInvalid

Deprecated

Description

If true, the form control will be invalid.

Deprecated

Use invalid instead.

Type

boolean

Default

false

isPreviewFocusable

Deprecated

Description

If true, the read only view, has a tabIndex set to 0 so it can receive focus via the keyboard or click.

Deprecated

Use previewFocusable instead.

Type

boolean

Default

true

isReadOnly

Deprecated

Description

If true, the form control will be readonly.

Deprecated

Use readOnly instead.

Type

boolean

Default

false

isRequired

Deprecated

Description

If true, the form control will be required.

Deprecated

Use required instead.

Type

boolean

Default

false

onCancel

Description

Callback invoked when user cancels input with the Esc key. It provides the last confirmed value as argument.

Type

(preValue: string) => void

onChange

Description

A callback invoked when user changes input.

Type

(value: string) => void

onEdit

Description

A callback invoked once the user enters edit mode.

Type

() => void

onSubmit

Description

A callback invoked when user confirms value with enter key or by blurring input.

Type

(value: string) => void

placeholder

Description

The placeholder text when the value is empty.

Type

string

previewFocusable

Description

If true, the read only view, has a tabIndex set to 0 so it can receive focus via the keyboard or click.

Type

boolean

Default

true

readOnly

Description

If true, the form control will be readonly.

Type

boolean

Default

false

required

Description

If true, the form control will be required.

Type

boolean

Default

false

selectAllOnFocus

Description

If true, the input's text will be highlighted on focus.

Type

boolean

Default

true

startWithEditView

Description

If true, the Editable will start with edit mode by default.

Type

boolean

submitOnBlur

Description

If true, it'll update the value onBlur and turn off the edit mode.

Type

boolean

Default

true

value

Description

The value of the Editable in both edit & preview mode.

Type

string

EditableTextareaProps

UseEditableProps

defaultValue

Description

The initial value of the Editable in both edit & preview mode.

Type

string

disabled

Description

If true, the form control will be disabled.

Type

boolean

Default

false

invalid

Description

If true, the form control will be invalid.

Type

boolean

Default

false

isDisabled

Deprecated

Description

If true, the form control will be disabled.

Deprecated

Use disabled instead.

Type

boolean

Default

false

isInvalid

Deprecated

Description

If true, the form control will be invalid.

Deprecated

Use invalid instead.

Type

boolean

Default

false

isPreviewFocusable

Deprecated

Description

If true, the read only view, has a tabIndex set to 0 so it can receive focus via the keyboard or click.

Deprecated

Use previewFocusable instead.

Type

boolean

Default

true

isReadOnly

Deprecated

Description

If true, the form control will be readonly.

Deprecated

Use readOnly instead.

Type

boolean

Default

false

isRequired

Deprecated

Description

If true, the form control will be required.

Deprecated

Use required instead.

Type

boolean

Default

false

onCancel

Description

Callback invoked when user cancels input with the Esc key. It provides the last confirmed value as argument.

Type

(preValue: string) => void

onChange

Description

A callback invoked when user changes input.

Type

(value: string) => void

onEdit

Description

A callback invoked once the user enters edit mode.

Type

() => void

onSubmit

Description

A callback invoked when user confirms value with enter key or by blurring input.

Type

(value: string) => void

placeholder

Description

The placeholder text when the value is empty.

Type

string

previewFocusable

Description

If true, the read only view, has a tabIndex set to 0 so it can receive focus via the keyboard or click.

Type

boolean

Default

true

readOnly

Description

If true, the form control will be readonly.

Type

boolean

Default

false

required

Description

If true, the form control will be required.

Type

boolean

Default

false

selectAllOnFocus

Description

If true, the input's text will be highlighted on focus.

Type

boolean

Default

true

startWithEditView

Description

If true, the Editable will start with edit mode by default.

Type

boolean

submitOnBlur

Description

If true, it'll update the value onBlur and turn off the edit mode.

Type

boolean

Default

true

value

Description

The value of the Editable in both edit & preview mode.

Type

string

Edit this page on GitHub

PreviousSaturationSliderNextRating