TextInput
Represents a text input component builder.
Example
Extends
BaseComponentBuilder
<APITextInputComponent
>
Constructors
new TextInput(data)
Creates a new TextInput instance.
Parameters
Parameter | Type | Description |
---|---|---|
data | Partial <APITextInputComponent > | Optional data for the text input. |
Returns
Overrides
BaseComponentBuilder
.constructor
Source
seyfert/src/builders/Modal.ts:118
Properties
Property | Modifier | Type | Inherited from |
---|---|---|---|
data | public | Partial <APITextInputComponent > | BaseComponentBuilder .data |
Methods
setCustomId()
Sets the custom ID of the text input.
Parameters
Parameter | Type | Description |
---|---|---|
id | string | The custom ID for the text input. |
Returns
this
The current TextInput instance.
Source
seyfert/src/builders/Modal.ts:168
setLabel()
Sets the label of the text input.
Parameters
Parameter | Type | Description |
---|---|---|
label | string | The label of the text input. |
Returns
this
The current TextInput instance.
Source
seyfert/src/builders/Modal.ts:137
setLength()
Sets the length constraints for the text input.
Parameters
Parameter | Type | Description |
---|---|---|
options | Partial <OptionValuesLength > | The length constraints. |
Returns
this
The current TextInput instance.
Source
seyfert/src/builders/Modal.ts:157
setPlaceholder()
Sets the placeholder of the text input.
Parameters
Parameter | Type | Description |
---|---|---|
placeholder | string | The placeholder text. |
Returns
this
The current TextInput instance.
Source
seyfert/src/builders/Modal.ts:147
setRequired()
Sets whether the text input is required.
Parameters
Parameter | Type | Default value | Description |
---|---|---|---|
required | boolean | true | Indicates whether the text input is required. |
Returns
this
The current TextInput instance.
Source
seyfert/src/builders/Modal.ts:188
setStyle()
Sets the style of the text input.
Parameters
Parameter | Type | Description |
---|---|---|
style | TextInputStyle | The style of the text input. |
Returns
this
The current TextInput instance.
Source
seyfert/src/builders/Modal.ts:127
setValue()
Sets the initial value of the text input.
Parameters
Parameter | Type | Description |
---|---|---|
value | string | The initial value. |
Returns
this
The current TextInput instance.
Source
seyfert/src/builders/Modal.ts:178
toJSON()
Returns
APITextInputComponent