Skip to main content
Module

x/tui/src/components/textbox.ts>TextboxComponent

🦕 Deno module for creating Terminal User Interfaces
Go to Latest
import { TextboxComponent } from "https://deno.land/x/tui@1.3.4/src/components/textbox.ts";

Component that allows user to input text. It implements most important ways to manipulate inputting text e.g.:

  • Arrows - Move cursor in specified direction
  • Return – Create new line
  • Home/End - Go to the start/end of the line
  • PgUp/PgDown - Go to the start/end of the text input
  • Delete/Backspace - Delete preceding/subsequent character

Constructors

new
TextboxComponent(options: TextboxComponentOptions)

Type Parameters

optional
EventMap extends EventRecord = Record<never, never>

Properties

cursorPosition: { x: number; y: number; }
hidden: boolean
lineHighlighting: boolean
lineNumbering: boolean
multiline: boolean
optional
placeholder: string
rawValue: string[]
value: string

Methods

draw(): void
interact(): void