Input | AIUI | Rokid

input accepts a single line of text and displays an input cursor while focused.

Input

input accepts a single line of text and displays an input cursor while focused.

Enter and Synchronize Text

<input value="{{query}}" placeholder="Search" maxLength="100" bindinput="handleInput" />
export default {
  data: { query: '' },
  handleInput(event) {
    this.setData({ query: event.detail.value });
  },
};

Properties

PropertyTypeDefaultDescription
valueString""Current text.
placeholderString""Hint shown while the field is empty and unfocused.
disabledBooleanfalseWhether keyboard input is ignored.
maxLengthNumber-Maximum number of accepted characters.

Placeholder color resolves from --input-placeholder-color, then --color-text-secondary, and finally the built-in gray fallback.

Events

EventEvent DataDescription
bindinput{ detail: { value: string } }Fires whenever the text changes.

event.detail.value is the full updated input text, not the character delta from the latest key. Use it directly for additions, deletions, and continuous input.