Examples
Default
Disabled
Size 32
With Left Icon
In A List
Props
InlineEdit
A chip-styled inline edit field. Renders as a dashed-border button that swaps to a text input on click, allowing the value to be edited in place. Enter and blur commit the draft viaonSubmit. Escape reverts to value and calls onCancel. Drafts that fail validate are reverted.
The forwarded ref points at the underlying <input> and is only populated while the field is in edit mode — it resolves to null in display mode.
Consumers may pass onChange, onBlur, and onKeyDown to participate in input events. The component’s own handlers run after the consumer’s, and keyboard handling is skipped if the consumer calls event.preventDefault().
(value: string) => void
required
Called with the trimmed draft when the user commits an edit (Enter or blur).
string
required
Current value displayed in the chip and used as the starting draft when editing.
string
Additional class name applied to the root element.
boolean
default:"false"
Whether the field is disabled — prevents entering edit mode.
string
default:"Edit"
Accessible label for the edit input.
ReactNode
Icon rendered before the value in display mode. Hidden when editing.
(() => void)
Called when the user cancels an edit with Escape.
"32" | "40"
default:"40"
Height of the field in pixels.
((draft: string) => boolean)
default:"rejects empty drafts"
Validator for the trimmed draft on commit. Returning
false reverts to the previous value without calling onSubmit.Exported types
Also exported from@fanvue/ui: InlineEditProps, InlineEditSize.
Setup: Installation · Theming