TRY NEW VERSION

Try now New API BETA

Try out the new view and capabilities of the API documentation

START

Input

Input field for single-line strings.

Interface: IInput.

See the parameters of this component in storybook.

Input

To change the input size, use InputSize (base, middle, big, huge, large), for the input types, use InputType (text or password), and for the autocomplete feature, use InputAutocomplete (on or off). More information can be found here.

Example
import {IInput, InputSize, InputType, IMessage, Actions, InputAutocomplete} from "@onlyoffice/docspace-plugin-sdk";

const onChange = (value: string) => {
    input.value = value;

    const message: IMessage = {
        "actions": [Actions.updateProps],
        "newProps": input,
    };

        return message;
};

const input: IInput = {
    "value": "",
    onChange,
    "scale": true,
    "size": InputSize.base,
    "type": InputType.text,
    "autoComplete": InputAutocomplete.off,
};