Leave Yamada UI a star

Star
Yamada UIYamada UIv1.6.4

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

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 ... | [...]

isDisabled

Description

If true, the form control will be disabled.

Type

boolean

Default

false

isInvalid

Description

If true, the form control will be invalid.

Type

boolean

Default

false

isPreviewFocusable

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

isReadOnly

Description

If true, the form control will be readonly.

Type

boolean

Default

false

isRequired

Description

If true, the form control will be required.

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

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

isDisabled

Description

If true, the form control will be disabled.

Type

boolean

Default

false

isInvalid

Description

If true, the form control will be invalid.

Type

boolean

Default

false

isPreviewFocusable

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

isReadOnly

Description

If true, the form control will be readonly.

Type

boolean

Default

false

isRequired

Description

If true, the form control will be required.

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

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