Editable

Inline click-to-edit text — a preview that becomes an input in place, for titles, labels and notes.

$bunx shadcn@latest add @nx-ui/editable
Registry item
Installs withbuttonutils

Project title

Click the title to rename in place. Enter commits, Escape reverts.

Renaming updates the scope header across the project workspace.

With action buttons

showActions renders confirm / cancel controls beside the field — handy on touch, where blur is fiddly.

Gate-fee note (multi-line)

Textarea mode for longer notes — new lines with Enter, commit with Cmd/Ctrl+Enter or the confirm button.

Double-click to edit

activateOnDoubleClick keeps a single click inert — useful in dense tables where rows are also selectable.

Placeholder & empty state

An empty value shows muted placeholder text until the field is filled in.

API reference

Exported parts and their props, extracted from the component source.

PropTypeDefaultDescription
valuestringControlled text value.
defaultValuestring""Uncontrolled initial text value.
onValueChange(value: string) => void
onSubmit(value: string) => voidFired with the committed value on Enter / blur / confirm.
onCancel() => voidFired when editing is abandoned via Escape / cancel.
editingbooleanControlled editing state.
defaultEditingbooleanfalse
onEditingChange(editing: boolean) => void
placeholderstring"Enter text…"
submitOnBlurbooleantrueCommit (rather than cancel) when the field loses focus. Default true.
maxLengthnumber
textareabooleanfalseMulti-line mode: renders a textarea (Cmd/Ctrl+Enter commits).
disabledbooleanfalse
activateOnDoubleClickbooleanfalseRequire a double-click to enter edit mode (single click otherwise).
showActionsbooleanfalseShow confirm / cancel action buttons beside the field.
previewClassNamestring
inputClassNamestring
namestring

…extends Omit< React.ComponentProps<"div">, "onSubmit" | "defaultVal…