Founding price: $35, then $79.99 after 23:59 UTC on 4 November, then $79.99
Get ProText that turns into a field in place with confirm and cancel buttons, validation, an async save and focus returned to the text afterwards.
Derived from this item’s props table, because it declares no controls of its own. Changes drive the preview live.
It builds on the button, input components, which the CLI installs for you.
import { InlineEdit } from "@/components/ui/inline-edit"<InlineEdit
label="Project name"
value={name}
validate={(v) => (v.length < 3 ? "Use at least 3 characters" : null)}
onSave={async (next) => setName(await rename(next))}
/>| Prop | Type | Default | Description |
|---|---|---|---|
value | string | - | The saved value. |
onSave | (next: string) => void | Promise<void> | - | Called with the trimmed value when valid and changed. A rejection shows its message. |
label | string | - | Names the field for screen readers. |
validate | (next: string) => string | null | - | Return a message to block saving. |
placeholder | string | "Add a value" | Shown when the value is empty. |
showActions | boolean | true | Show Save and Cancel buttons. |
saveOnBlur | boolean | true | Save when focus leaves the field; otherwise cancel. |
Role: textbox.