TextField
COMPONENT

CONTROLS / TEXTFIELD

TextField

Native macOS desktop text input supporting both single-line Return submission (onSubmit) and multi-line editing (multiline) — ideal for scratchpads, quick todo capture, and instant translators.

Signature#

SIGNATURE
<TextField
  value={draft}
  placeholder="Type a note…"
  multiline={false}
  onChange={setDraft}
  onSubmit={handleAdd}
/>
Single-line · Return to submit
Interactive
Press Return to trigger onSubmit

Props#

Inherits StyleProps:

valuestringRequired
Controlled text value.
placeholderstringOptional
Hint shown when value is empty.
multilinebooleanDefault false
Set true for multi-line notes; false gives a single-line field that fires onSubmit on Return.
fontSizenumberOptional
Input text size in points.
lineSpacingnumberOptional
Extra line spacing in points when multiline is true.
colorstringDefault "theme.ink"
Text ink color.
onChangefunctionOptional
Callback (text: string) => void fired whenever the text changes.
onSubmitfunctionOptional
Callback (text: string) => void fired on Return in single-line mode.

Example: Multiline Desktop Scratchpad#

TSX
<TextField
  value={note}
  placeholder="Jot down a quick thought…"
  multiline={true}
  fontSize={13}
  lineSpacing={4}
  onChange={setNote}
/>
multiline={true}
Interactive
0 chars