Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Properties

Optional border

border: boolean

If there should be a border around the text box or not. Defaults to true.

Optional content

content: string

What is typed in the text box by default. Defaults to no content.

Optional linkToWriter

linkToWriter: TextBoxWriter

Text box writer to link to this text box. This allows changing the contents of the text box using the writer.

Optional noBottomMargin

noBottomMargin: boolean

If there should be no margin at the bottom. Defaults to false.

Optional onInput

onInput: (newContent: string) => void

Event handler called every time the input event is triggered, eg. whenever the user types or deletes a character. Defaults to no event listener.

Type declaration

    • (newContent: string): void
    • Parameters

      • newContent: string

      Returns void

Optional onKeydown

onKeydown: (event: KeyboardEvent) => void

Event handler called every time the keydown event is triggered, eg. whenever the user presses a key, including, eg, arrow keys or Shift. Defaults to no event listener.

Type declaration

    • (event: KeyboardEvent): void
    • Parameters

      • event: KeyboardEvent

      Returns void

Optional placeholder

placeholder: string

Placeholder, ie. the lightly colored text displayed when nothing has been typed in to a text box. Potentially bad practice because it makes the box look filled at a glance and because the hint disappears while the user is still typing, so consider if a label might work better. Defaults to no placeholder.

Generated using TypeDoc