seyfert
    Preparing search index...

    Class TextInput

    Represents a text input component builder.

    const textInput = new TextInput().setLabel("Enter text");
    textInput.setStyle(TextInputStyle.Paragraph);
    textInput.setPlaceholder("Type here");
    const json = textInput.toJSON();

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    data: Partial<TYPE> = {}

    Methods

    • Sets the custom ID of the text input.

      Parameters

      • id: string

        The custom ID for the text input.

      Returns this

      The current TextInput instance.

    • Sets the label of the text input.

      Parameters

      • label: string

        The label of the text input.

      Returns this

      The current TextInput instance.

    • Sets the placeholder of the text input.

      Parameters

      • placeholder: string

        The placeholder text.

      Returns this

      The current TextInput instance.

    • Sets whether the text input is required.

      Parameters

      • required: boolean = true

        Indicates whether the text input is required.

      Returns this

      The current TextInput instance.

    • Sets the style of the text input.

      Parameters

      • style: TextInputStyle

        The style of the text input.

      Returns this

      The current TextInput instance.

    • Sets the initial value of the text input.

      Parameters

      • value: string

        The initial value.

      Returns this

      The current TextInput instance.