Skip to content
hightouchUI

Design system

v40.8.0

Editable heading

Editable heading allows user to edit the name of some resource in the same place as it's displayed.

Usage

Basic

Truncated heading

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

Disabled

Skeleton

The editable heading has a skeleton state.

Combinations

Guidelines

When to use

  • As a quick way to edit the name of some resource, without redirecting to a dedicated settings page.

When not to use

  • If the name is edited as part of a form or settings page, use a text input in a form field instead.
  • If the text is not a heading, use an editable text instead.

Props

Inherits margin props.

NameDefaultDescription
inputProps

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

The input props

isDisabledfalseboolean

Determines if heading is editable.

placeholder

string

The placeholder text to use when the field is empty.

size"md""md" | "lg"

Size of the heading.

value

string

Heading value.

widthundefined"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.