Skip to content

The TextField Component ​

Use the TextField component to input text.

Different from the Textarea component, the TextField component is a single-line input.

TriggerComponent

例子

ts
if (_.xTextField(value, "Username", disabled)) {
  console.log(`New value: ${_.$ev}`);
}

Param: value ​

type: D<string>

The value of the text field.

Param: label ​

optional

type: D<string>

↑ D<Content> if HTML label is supported.

The label of the text field.

Param: placeholder ​

optional

type: D<string>

The placeholder of the text field.

May be combined with label.

Param: disabled ​

optional
= false

type: D<boolean>

Whether the text field is disabled.

Triggered when: input ​

data type: string

When the value of the text field is changed, the new value will be emitted.