Repository: gradio-app/gradio
File: gradio/components/textbox.py (Python)

Code before:
        spellcheck: The spellcheck attribute for the input/textarea element. Can be True (enabled) or False (disabled).
        autocomplete: The autocomplete attribute for the input/textarea element. Can be "on", "off", or specific values like "email", "current-password", "new-password", etc.
        tabindex: The tabindex attribute for the input/textarea element. An integer specifying the tab order.
        enterkeyhint: The enterkeyhint attribute for the input/textarea element. Can be "enter", "done", "go", "next", "previous", "search", or "send".
        lang: The lang attribute for the input/textarea element. A string containing a language code (e.g., "en", "es", "fr").
        aria_label: The aria-label attribute for the input/textarea element. A string providing an accessible name for screen readers.
        aria_describedby: The aria-describedby attribute for the input/textarea element. A string containing IDs of elements that describe this element.
        aria_placeholder: The aria-placeholder attribute for the input/textarea element. A string providing placeholder text for screen readers.
    """

    autocapitalize: Optional[str] = None
    autocorrect: Optional[bool] = None
    spellcheck: Optional[bool] = None
    autocomplete: Optional[str] = None
    tabindex: Optional[int] = None
    enterkeyhint: Optional[str] = None
    lang: Optional[str] = None
    aria_label: Optional[str] = None
    aria_describedby: Optional[str] = None
    aria_placeholder: Optional[str] = None


@document()
class Textbox(FormComponent):
    """
    Creates a textarea for user to enter string input or display string output.

    Demos: hello_world, diff_texts, sentence_builder
    Guides: creating-a-chatbot, real-time-speech-recognition
    """

    EVENTS = [
        Events.change,
        Events.input,
        Events.select,
        Events.submit,
        Events.focus,
        Events.blur,
        Events.stop,
        Events.copy,
    ]

    def __init__(
        self,
        value: str | I18nData | Callable | None = None,
        *,
        type: Literal["text", "password", "email"] = "text",
        lines: int = 1,
        max_lines: int | None = None,
        placeholder: str | I18nData | None = None,
        label: str | I18nData | None = None,

Review comment (suggestion):
I think it would be better if the frontend just received the processed attributes (perhaps minus the snake to kebab conversion if necessary). 

We can process the values and turn them into strings here. The frontend can then just remove the kebab case and null values. 

Code after:
        spellcheck: The spellcheck attribute for the input/textarea element. Can be True (enabled) or False (disabled).
        autocomplete: The autocomplete attribute for the input/textarea element. Can be "on", "off", or specific values like "email", "current-password", "new-password", etc.
        tabindex: The tabindex attribute for the input/textarea element. An integer specifying the tab order.
        enterkeyhint: The enterkeyhint attribute for the input/textarea element. Can be "enter", "done", "go", "next", "previous", "search", or "send".
        lang: The lang attribute for the input/textarea element. A string containing a language code (e.g., "en", "es", "fr").
        aria_label: The aria-label attribute for the input/textarea element. A string providing an accessible name for screen readers.
        aria_describedby: The aria-describedby attribute for the input/textarea element. A string containing IDs of elements that describe this element.
        aria_placeholder: The aria-placeholder attribute for the input/textarea element. A string providing placeholder text for screen readers.
    """

    autocapitalize: Optional[
        Literal["off", "none", "on", "sentences", "words", "characters"]
    ] = None
    autocorrect: Optional[Literal["on", "off"]] = None
    spellcheck: Optional[bool] = None
    autocomplete: Optional[str] = None
    tabindex: Optional[int] = None
    enterkeyhint: Optional[
        Literal["enter", "done", "go", "next", "previous", "search", "send"]
    ] = None
    lang: Optional[str] = None
    aria_label: Optional[str] = None
    aria_describedby: Optional[str] = None
    aria_placeholder: Optional[str] = None


@document()
class Textbox(FormComponent):
    """
    Creates a textarea for user to enter string input or display string output.

    Demos: hello_world, diff_texts, sentence_builder
    Guides: creating-a-chatbot, real-time-speech-recognition
    """

    EVENTS = [
        Events.change,
        Events.input,
        Events.select,
        Events.submit,
        Events.focus,
        Events.blur,
        Events.stop,
        Events.copy,
    ]

    def __init__(
        self,
        value: str | I18nData | Callable | None = None,
        *,
        type: Literal["text", "password", "email"] = "text",