Components / Text & numbers

EditableText

Inline click-to-edit text, single or multi-line.

@ruckc/truss-ui Text & numbers

Import

import { EditableText } from '@ruckc/truss-ui';

Playground

value

API

PropTypeDefaultDescription
value bindable string''The current value. Bind it with `bind:value`.
placeholder string'Click to edit'Hint shown while the field is empty.
multiline booleanfalseEnter inserts a newline; Ctrl/⌘+Enter commits.
selectAll booleantrueSelect the whole text when editing starts.
disabled booleanfalseDisables the control: it cannot be focused, changed or activated.
label string'Edit text'Accessible name of the edit control.
onconfirm event(value: string) => void—Called when the user confirms.
/docs/editable-text Truss UI · MIT