When to use
Section titled “When to use”- To correct a single value on a detail page without leaving it: merchant name, note, tag.
When not to use
Section titled “When not to use”- When several fields change together: use a form and SaveBar.
- For sensitive fields that need checks or confirmation: IBAN, amount. Use a separate form.
- For bulk edits in table cells: use an edit flow that opens the row.
Anatomy
Section titled “Anatomy”- Value: the text, or the empty text.
- Edit button: an IconButton with a pencil; its name includes the label.
- Field: an input named by the label.
- Save and Cancel: buttons with check and cross icons.
- Error: the
validatemessage.
Behaviour
Section titled “Behaviour”- The edit button opens the field with the text selected.
- Enter or Save validates and saves; Escape or Cancel drops the change.
- On close, focus returns to the edit button.
- When the value did not change,
onSaveis not called.
Guidelines
Section titled “Guidelines”- Show the label next to the value too; InlineEdit only names the field.
- Keep only one InlineEdit open on a page at a time.
Content
Section titled “Content”- The error says what to do: “The name cannot be empty.”
Related components
Section titled “Related components”- TextInput: the text field in a form.
- DescriptionList: a list of labels and values; InlineEdit can be a value.
- SaveBar: a save bar for several changes.