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-editprops
| name | type | default | description |
|---|---|---|---|
| value | string | - | 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. |
| trim | boolean | true | trim the draft before comparing / committing. |