TLUiInputProps

See source code
Table of contents
interface TLUiInputProps {}

Properties

"aria-label"

optional
"aria-label"?: string;

"data-testid"

optional
"data-testid"?: string;

autoFocus

optional
autoFocus?: boolean;

autoSelect

optional
autoSelect?: boolean;

children

optional
children?: React.ReactNode;

className

optional
className?: string;

defaultValue

optional
defaultValue?: string;

disabled

optional
disabled?: boolean;

icon

optional
icon?: Exclude<string, TLUiIconType> | TLUiIconType;

iconLabel

optional
iconLabel?: Exclude<string, TLUiTranslationKey> | TLUiTranslationKey;

iconLeft

optional
iconLeft?: Exclude<string, TLUiIconType> | TLUiIconType;

label

optional
label?: Exclude<string, TLUiTranslationKey> | TLUiTranslationKey;

placeholder

optional
placeholder?: string;

shouldManuallyMaintainScrollPositionWhenFocused

optional

Usually on iOS when you focus an input, the browser will adjust the viewport to bring the input into view. Sometimes this doesn't work properly though - for example, if the input is newly created, iOS seems to have a hard time adjusting the viewport for it. This prop allows you to opt-in to some extra code to manually bring the input into view when the visual viewport of the browser changes, but we don't want to use it everywhere because generally the native behavior looks nicer in scenarios where it's sufficient.

shouldManuallyMaintainScrollPositionWhenFocused?: boolean;

value

optional
value?: string;

Methods

onBlur

optional

Parameters

NameDescription

value

string;

Returns

void;

onCancel

optional

Parameters

NameDescription

value

string;

Returns

void;

onComplete

optional

Parameters

NameDescription

value

string;

Returns

void;

onFocus

optional

onValueChange

optional

Parameters

NameDescription

value

string;

Returns

void;

Prev
TLUiImageToolbarProps
Next
TLUiKbdProps