TextInput API Reference#
- class miru.text_input.TextInput(*, label: str, style: ~hikari.components.TextInputStyle = <TextInputStyle.SHORT: 1>, placeholder: str | None = None, value: str | None = None, required: bool = False, min_length: int | None = None, max_length: int | None = None, custom_id: str | None = None, row: int | None = None)[source]#
Bases:
ModalItemA text input field that can be used in modals.
- Parameters:
label (str) – The label above the text input field.
style (hikari.TextInputStyle, optional) – The style of the text input, by default hikari.TextInputStyle.SHORT
placeholder (Optional[str], optional) – Placeholder content in the text input, by default None
value (Optional[str], optional) – Pre-filled content of the input field, by default None
required (bool, optional) – If the text input is required for modal submission, by default False
min_length (Optional[int], optional) – The minimum required input length of the text input, by default None
max_length (Optional[int], optional) – The maximum allowed input length of the text input, by default None
custom_id (Optional[str], optional) – The custom identifier of the text input, by default None
row (Optional[int], optional) – The row of the text input, by default None
- property style: TextInputStyle#
The text input’s style.
- property type: ComponentType#
The component’s underlying component type.