Rebar UI

1.0

opinion

Editable

Text that turns into an input when you click it. Enter saves, Escape reverts.

Project nameClick to edit
No Enter hint
Empty, placeholder
Disabled
Long text

In context

Project headerRename the project and its tasks in place

On track
PNResearch
MCDesign
MCDesign
MCDesign

Props

PropTypeRequiredDefault
valuestring | undefinedNo—
defaultValuestring | undefinedNo
onChange((value: string) => void) | undefinedNo—
onSubmit((value: string) => void) | undefinedNo—
placeholderstring | undefinedNo—
aria-labelstring | undefinedNo—
disabledboolean | undefinedNo—
classNamestring | undefinedNo—
showEnterHintboolean | undefinedNotrue

Accessibility

The read-mode display is a real, focusable, keyboard-activatable <button> (Enter/Space enters edit mode) — never a bare <span onClick> that only a mouse or a screen-reader's click-simulation could reach.

data-rebar-* attributes

data-rebar-component="editable"; data-rebar-part is "display" (read mode), "input-wrapper"/"input" (edit mode), or "enter-hint" (the Enter-to-save glyph, when shown).

Migrating to Ant Design

Not codemod-covered — AntD has no direct equivalent; Typography.Text editable is the closest, but its callback shape and edit-trigger prop differ enough to need a hand rewrite.