Ship-It Designv0.0.20

GitHub

InlineEdit

Display-to-input rename primitive. Click the value (or focus + Enter), type, then Enter to commit or Escape to cancel.

api-gateway

Empty state#

Shows the placeholder until a value is committed.

Add a description

Headings#

Use as="h1" | "h2" | "h3" to keep heading semantics. The element advertises itself as editable via aria-roledescription="editable".

Phase 3 — Visual schema editor

Validation#

validate runs on commit. Return an error message to reject and keep the editor open; return null to accept.

payments-svc

Disabled#

locked-name

Props#

Props for InlineEdit
PropTypeDefaultDescription
value *stringCurrent label value.
onValueChange *(next: string) => voidFired with the committed value.
asenumspanDisplay element. Default 'span'. Use 'h1'-'h3' for headings.
activateenumdblclickActivation gesture besides the always-on Enter-on-focus. Default 'dblclick'.
commitOnBlurboolean | undefinedtrueCommit (vs cancel) on blur. Default `true`.
validate((next: string) => string | null) | undefinedReturns an error message on rejection, or `null` on success.
placeholderstring | undefinedEmptyShown when `value` is empty in display mode.
disabledboolean | undefinedfalseDisables activation and applies a muted style.
editingboolean | undefinedControlled editing flag.
onEditingChange((next: boolean) => void) | undefinedFired when the editing flag changes (uncontrolled mode or external open).
inputClassNamestring | undefinedExtra className on the `<input>` in edit mode.
aria-labelstring | undefinedAccessible label for the display element. Default `Edit {value}`.
size"sm" | "md" | "lg" | null | undefined

Accessibility#

  • The display element is keyboard-focusable. Press Enter (or Space) to enter edit mode, regardless of the activate setting.
  • For non-heading elements (span, div) role="button" is applied so screen readers announce the rename affordance. For headings the implicit heading role wins and aria-roledescription="editable" describes the affordance.
  • Escape cancels and restores the original value. Blur commits by default — pass commitOnBlur={false} to revert instead.
  • The accessible label defaults to Edit {value}. Override with aria-label for custom phrasing.