Carbon
CoreClasses

TextInput

Extends

Constructors

new TextInput()

new TextInput(data?): TextInput

Parameters

ParameterType
data?object
data.additionalData?ComponentAdditionalData

Returns

TextInput

Inherited from

BaseComponent.constructor

Properties

PropertyModifierTypeDefault valueDescriptionOverridesInherited from
additionalDatapublicnull | ComponentAdditionalDatanull--BaseComponent.additionalData
customIdabstractstringundefinedThe custom ID of the text inputBaseComponent.customId-
deferpublicbooleanfalseWhether the component response should be automatically deferred-BaseComponent.defer
ephemeralpublicbooleanfalseWhether the component response should be ephemeral-BaseComponent.ephemeral
labelabstractstringundefinedThe label of the text input--
maxLength?publicnumberundefinedThe maximum length of the text input--
minLength?publicnumberundefinedThe minimum length of the text input--
placeholder?publicstringundefinedThe placeholder of the text input--
required?publicbooleanundefinedWhether the text input is required--
stylepublicTextInputStyleTextInputStyle.ShortThe style of the text input Default TextInputStyle.Short--
typepublicComponentTypeComponentType.TextInputThe type of the componentBaseComponent.type-
value?publicstringundefinedThe value of the text input--

Methods

createId()

createId(additionalData): string

Create a custom ID to use for this component that embeds additional data that you want to be handed

Parameters

ParameterTypeDescription
additionalDatanull | ComponentAdditionalDataThe additional data that you want to be passed in this component's custom ID

Returns

string

The custom ID to use

Inherited from

BaseComponent.createId


serialize()

serialize(): APITextInputComponent

Returns

APITextInputComponent

Overrides

BaseComponent.serialize

On this page

Edit on GitHub