class TextInputBuilder
implements
Equatable<APITextInputComponent | JSONEncodable<APITextInputComponent>>extends
ComponentBuilder<APITextInputComponent>export declare class TextInputBuilder extends ComponentBuilder<APITextInputComponent> implements Equatable<APITextInputComponent | JSONEncodable<APITextInputComponent>>
A builder that creates API-compatible JSON data for text inputs.
Constructors
data?: APITextInputComponent & { type?: ComponentType.TextInput; })
constructor(Creates a new text input from API data.
readonlyPartial<APITextInputComponent> data :
The API data associated with this component.
Inherited from: ComponentBuilder
Clears the id of this component, defaulting to a default incremented id.
Inherited from: ComponentBuilder
equals) : boolean (
Whether this is equal to another structure.
setCustomIdcustomId: string) : this (
Sets the custom id for this text input.
setIdid: number) : this (
Sets the id (not the custom id) for this component.
Inherited from: ComponentBuilder
setLabellabel: string) : this (
Sets the label for this text input.
setMaxLengthmaxLength: number) : this (
Sets the maximum length of text for this text input.
setMinLengthminLength: number) : this (
Sets the minimum length of text for this text input.
setPlaceholderplaceholder: string) : this (
Sets the placeholder for this text input.
setRequiredrequired?: boolean) : this (
Sets whether this text input is required.
setStylestyle: TextInputStyle) : this (
Sets the style for this text input.
setValuevalue: string) : this (
Sets the value for this text input.
toJSONAPITextInputComponent () :
Serializes this builder to API-compatible JSON data.