InlineEdit

Edit a value in place — a value that reads as plain text until you touch it, then becomes a real field. Compound Preview ⟷ Control with click/focus/dblclick activation, quiet or explicit commit, validation, dirty-check, optimistic updates, async save, and a swappable typed control.

Betav0.3.0@garn/ui/inline-edit

Default

The default — a controlled value, click to edit, Enter/blur to commit.

Presets

Quiet (Enter/blur, no buttons) vs explicit (Save/Cancel) — one API.

quiet (Enter / blur commits — no buttons)

explicit (Save / Cancel buttons; blur keeps the editor open)

Activation

click · dblclick · none (EditTrigger only).

click (default)

dblclick

none — explicit EditTrigger only

Multiline

An auto-growing textarea — Enter inserts a newline, ⌘/Ctrl+Enter saves.

Empty

An empty value shows the muted placeholder and still reads as editable.

Max Length

A capped value with a live character counter.

Async

An async onSubmit — a spinner while saving, stays open with the error on failure.

Affordance

A hover-revealed edit pencil (EditTrigger `reveal`) for discoverability.

Validation

required + validate gate a commit with an inline error before it persists.

Optimistic

Optimistic commit — closes immediately, rolls back and reopens on failure.

Typed

A NumberField edit-state control wired through the useInlineEdit() hook.

Sizes

sm · md · lg.

Appearances

ghost (text until touched) · outline · soft.

ghost

outline

soft

Form

Form integration — `name` submits the committed value via a hidden input.

Data Rich

InlineEdits inside a DataList — an editable detail panel.

Name
Title
Team
Not set