components / inline-edit

inline-edit.

blur-to-save editable field. holds a local draft, commits onblur and enter, shows a pending state, rolls back on error, escape cancels. behavior split into a headless useInlineEdit hook.

installation
bunx @justin06lee/chrome@latest add inline-edit
props
nametypedefaultdescription
valuestring-controlled source of truth, owned by the caller.
onCommit(next: string) => void | Promise<void>-commit handler (onblur / enter). throw to roll back to the previous value.
trimbooleantruetrim the draft before comparing / committing.