Editable Text

Editable text allows user to edit text in the same place as it's displayed.

#

#

#

The preview value and input should automatically fit the parent container's space. If a specific width is wanted, use the width prop.

#

#

The editable text has a skeleton state.

#

#

#

  • Used for infrequently edited text

#

Inherits Text props.

NameDefaultDescription
inputProps

Pick<InputProps, "width" | "maxLength" | "minLength">

The input props

isDisabledfalseboolean

Determines if text is editable.

placeholder

string

The placeholder text to use when the field is empty.

size"md""sm" | "md"

Size of the text.

value

string

Text value.

width"auto""auto" | "100%" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl"

Width of the component.

onChange

(value: string) => void

Callback invoked when user confirms the new value.

onCancel

(value: string) => void

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

On this page

  • Usage
  • Basic
  • Truncated text
  • Disabled
  • Skeleton
  • Combinations
  • Guidelines
  • When to use
  • Props