Table of contents

Public interface

Signature
interface TLUiInputProps {}
Source

packages/tldraw/src/lib/ui/components/primitives/Input.tsx


Properties

autofocus

Public propertysignature

Signature
autofocus?: boolean

autoselect

Public propertysignature

Signature
autoselect?: boolean

children

Public propertysignature

Signature
children?: any

className

Public propertysignature

Signature
className?: string

defaultValue

Public propertysignature

Signature
defaultValue?: string

disabled

Public propertysignature

Signature
disabled?: boolean

icon

Public propertysignature

Signature
icon?: Exclude<string, TLUiIconType> | TLUiIconType
References

TLUiIconType


iconLeft

Public propertysignature

Signature
iconLeft?: Exclude<string, TLUiIconType> | TLUiIconType
References

TLUiIconType


label

Public propertysignature

Signature
label?: Exclude<string, TLUiTranslationKey> | TLUiTranslationKey
References

TLUiTranslationKey


onBlur

Public propertysignature

Signature
onBlur?: (value: string) => void

onCancel

Public propertysignature

Signature
onCancel?: (value: string) => void

onComplete

Public propertysignature

Signature
onComplete?: (value: string) => void

onValueChange

Public propertysignature

Signature
onValueChange?: (value: string) => void

placeholder

Public propertysignature

Signature
placeholder?: string

shouldManuallyMaintainScrollPositionWhenFocused

Public propertysignature

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.

Signature
shouldManuallyMaintainScrollPositionWhenFocused?: boolean

value

Public propertysignature

Signature
value?: string

TLUiIconTypeTLUiKeyboardShortcutsSchemaContextType