Inline edit
Lets a person change one saved value where it is shown, such as a watchlist's name or one figure in a record, and says whether the change was saved.
Examples
24 funds, updated daily
- Target weight, percent
- Name
- Owner
- Purpose
- Notes
- Shared with the credit team
Usage
Use it when
- One value on a record's page that its owner renames or corrects now and then, such as a watchlist's name in its header or one detail in a list of a saved search's details.
- A value that saves on its own, in one request, when the person presses Enter or leaves the field.
Use something else when
- Several values that are saved together, or are checked before they go. Use Field instead, with Input in a form and one Save.
- A value picked from a fixed set, such as how often an alert runs. Use Select instead.
- Text that runs to more than one line, such as a note. Use Textarea instead.
- A number a person steps up and down, or whose bounds hold while typing. Use NumberField instead.
Rules
General
Content
Avoid
Limits
Install
npx shadcn@latest add https://kaanarici.com/r/cobalt/inline-edit.jsonimport { InlineEdit, commitDraft, inlineEditLabels } from "@/components/cobalt/ui/inline-edit"