Represents a text input builder.
Extends
BuilderTextInputComponentConstructs a new instance of the
TextInputBuilder
className | Type | Optional | Description |
---|---|---|---|
data | Partial<TextInputComponentData | APITextInputComponent> | Yes | None |
The API data associated with this component.
Inherited from ComponentBuilderName | Type | Optional | Description |
---|---|---|---|
other | APITextInputComponent | JSONEncodable<APITextInputComponent> | No | None |
Creates a new text input builder from JSON data
Name | Type | Optional | Description |
---|---|---|---|
other | JSONEncodable<APITextInputComponent> | APITextInputComponent | No | The other data |
Sets the custom id for this text input.
Name | Type | Optional | Description |
---|---|---|---|
customId | string | No | The custom id to use |
Sets the label for this text input.
Name | Type | Optional | Description |
---|---|---|---|
label | string | No | The label to use |
Sets the maximum length of text for this text input.
Name | Type | Optional | Description |
---|---|---|---|
maxLength | number | No | The maximum length of text for this text input |
Sets the minimum length of text for this text input.
Name | Type | Optional | Description |
---|---|---|---|
minLength | number | No | The minimum length of text for this text input |
Sets the placeholder for this text input.
Name | Type | Optional | Description |
---|---|---|---|
placeholder | string | No | The placeholder to use |
Sets whether this text input is required.
Name | Type | Optional | Description |
---|---|---|---|
required | boolean | Yes | Whether this text input is required |
Sets the style for this text input.
Name | Type | Optional | Description |
---|---|---|---|
style | TextInputStyle | No | The style to use |
Sets the value for this text input.
Name | Type | Optional | Description |
---|---|---|---|
value | string | No | The value to use |
Serializes this builder to API-compatible JSON data.