Subcomponents

This component has 3 subcomponents:

Control

The control subcomponent is required to render the Control of the TextInput component. Because of this, this component extends the native <input>arrow-up-right component props. Because of this, you can use all of the native props. This is a required children.

Control API

triangle-exclamation
Props
Type
Required

defaultValue

string | number | readonly string[] | undefined;

❌

value

string | number | readonly string[] | undefined

❌

hasError

boolean

❌

isDisabled

boolean

❌

isReadOnly

boolean

❌

maxLength

number

❌

customFilter

(value: string) => string;

❌

onChange

(e: React.ChangeEvent<HTMTextAreaElement>) => void;

❌

chevron-rightdefaultValuehashtag

This sets a default value for the input when the DOM is rendered. This is used for an uncontrolled approach.

chevron-rightvaluehashtag

Prop that control the value, used when using a controlled approach.

chevron-rightmaxLengthhashtag

Indicates a max length value to write in the input component. This does control the max length entirely.

chevron-rightcustomFilterhashtag

Function where developers can create their own filters

chevron-rightonChangehashtag

Specifies a function to be called when the field's value changes

HelpText

The HelpText subcomponent extends the SDS HelpText component. See for reference: HelpText

Label

The Label subcomponent extends the SDS label component. See for reference: Label

Last updated