Skip to content
View Markdown

TextEditor ​

A field for editing multiple lines of text.

tsx
import { TextEditor } from '@satinhq/kit'

Example ​

Click the Notes field and type. Try the system keyboard on a device.

Bind the text ​

Keep the text in React state. Pass the string to value and its setter to onChange.

Name the field ​

Use label for its accessible name. A prompt supplies placeholder text when the field is empty.

Bound the editor's growth ​

Use minLines and maxLines to bound the editor's height. Return inserts a line break; use a separate Button for saving or sending the text.

API ​

Scroll horizontally to read every column.

PropTypeDescription
labelstringThe accessible name.
valuestringThe current text.
onChange(value: string) => voidReceives edited text.
promptstringOptional placeholder.
minLinesnumberMinimum visible lines.
maxLinesnumberOptional growth limit.

Related: Quick start, List, Screen.

:::

Satin runs on the Lumen rendering engine and is open source under the MIT License.