Editable

Inline click-to-edit text field

Category: inputs · WCAG 2.2-AA · form, editable, inline, input, text

States

Props

PropTypeDefaultDescription
valuestringThe controlled value.
onValueChange(v: string) => voidCalled with the new value when it changes.
placeholderstringPlaceholder text shown when the field is empty.
disabledbooleanfalseWhen true, disables the control and removes it from the tab order.
submitOnBlurbooleantrueWhen true, commits the edit when the field loses focus.
onCancel() => voidCalled when the edit is cancelled.

Design tokens

When to use

When not to use

How to build an accessible Editable in React →

Examples

Basic

<Editable value="Click to edit" onValueChange={() => {}} />

With placeholder

<Editable value="" onValueChange={() => {}} placeholder="Enter text" />

Related components

← Back to docs