Overview
Use InlineEdit for short, low-risk updates where keeping surrounding context is more valuable than opening a form or panel.
Project name
Activate the value, edit it, then save with Enter or cancel with Escape.
Anatomy
InlineEdit moves between a readable display and an editor with explicit save, cancel, and validation feedback.
- 1Label
Names the editable property.
- 2Editor
Holds a temporary draft value.
- 3Save
Validates and commits the draft.
- 4Cancel
Discards the draft and restores the value.
- 5Validation
Explains why the draft cannot be saved.
When to use
Use for familiar properties that can be changed safely and understood in place.
Recommended
- Edit a single property
Update names, labels, owners, or concise descriptions.
- Preserve context
Keep related records and consequences visible.
- Support fast review
Make frequent low-risk corrections without navigation.
When not to use
Use a form surface when editing needs several fields, complex guidance, or confirmation.
Avoid
- Do not edit dependent fields
Use SidePanel or Dialog for coordinated inputs.
- Do not hide high-risk changes
Use an explicit confirmation workflow.
- Do not edit rich content
Use a dedicated editor for formatting and attachments.
Variants
Container treatment, size, and editor type adapt InlineEdit to tables, details panels, and descriptions.
Plain
Integrates into an existing details surface.
Outlined
Defines the complete editable region.
Tonal
Distinguishes editable metadata.
Multiline
Supports short paragraph content.
States
Committed and draft values remain separate until validation succeeds.
| State | Trigger | Visual response | Interaction |
|---|---|---|---|
| Display | Not editing | Committed value and revealed edit affordance | Activate to edit |
| Editing | Edit begins | Focused field and actions | Draft changes only |
| Invalid | Validation fails | Error border and message | Correct or cancel |
| Saving | Async persistence | Progress in save control | Actions disabled |
| Empty | No committed value | Add a value prompt | Activate to create |
| Disabled | Editing unavailable | Reduced emphasis | Cannot enter edit mode |
Behavior
InlineEdit owns draft and focus mechanics while applications own persistence, authorization, conflicts, and notifications.
Begin
Entering edit mode copies the committed value into a selected draft.
Commit
Save validates before changing the committed value.
Cancel
Cancel restores the original value without firing change.
Persistence
Saving state can hold controls while remote work completes.
Accessibility
Display and edit modes expose explicit native controls, visible labeling, invalid state, and predictable focus.
| Key | Action |
|---|---|
| EnterSpace | Enters edit mode from the display control. |
| Enter | Saves a single-line draft. |
| ⌘/CtrlEnter | Saves a multiline draft. |
| Esc | Cancels and restores the committed value. |
| Tab | Moves among editor, save, and cancel. |
- Provide a visible property label or explicit input label.
- Give edit, save, and cancel controls specific names.
- Expose invalid state and connect its message.
- Do not save automatically when focus moves unexpectedly.
- Return to a stable control after mode changes.
- Keep the committed value available outside edit mode.
Content guidelines
Labels, empty prompts, and errors should describe the property and correction precisely.
Name the property
Use its established product label.
Project name
Prompt empty values
Use Add plus the property.
Add an owner note
Explain constraints
State how to make the draft valid.
Enter a unique project name.
Keep controls direct
Use Save and Cancel accessible names.
Save changes
Examples
Multiline and saving state support concise descriptions with remote persistence.
Description editor
Props / API
InlineEdit extends div attributes and supports controlled committed value and editing state.
Props