Static p5_sys::global::createInput[][src]

pub static createInput: CreateInputInternalType
Expand description

Creates an input element in the DOM for text input. Use .size() to set the display length of the box.

Examples

function setup() {
  let inp = createInput('');
  inp.input(myInputEvent);
}

function myInputEvent() {
  console.log('you are typing: ', this.value());
}

Overloads

value default value of the input box

type? type of text, ie text, password etc. Defaults to text. Needs a value to be specified first.


value? default value of the input box