TLUiInputProps
Table of contents
Public interface
interface TLUiInputProps {}
packages/tldraw/src/lib/ui/components/primitives/TldrawUiInput.tsx
Properties
autoFocus
Public propertysignature
autoFocus?: boolean
autoSelect
Public propertysignature
autoSelect?: boolean
children
Public propertysignature
children?: React.ReactNode
className
Public propertysignature
className?: string
defaultValue
Public propertysignature
defaultValue?: string
disabled
Public propertysignature
disabled?: boolean
icon
Public propertysignature
icon?: Exclude<string, TLUiIconType> | TLUiIconType
iconLeft
Public propertysignature
iconLeft?: Exclude<string, TLUiIconType> | TLUiIconType
label
Public propertysignature
label?: Exclude<string, TLUiTranslationKey> | TLUiTranslationKey
onBlur
Public propertysignature
onBlur?: (value: string) => void
onCancel
Public propertysignature
onCancel?: (value: string) => void
onComplete
Public propertysignature
onComplete?: (value: string) => void
onFocus
Public propertysignature
onFocus?: () => void
onValueChange
Public propertysignature
onValueChange?: (value: string) => void
placeholder
Public propertysignature
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.
shouldManuallyMaintainScrollPositionWhenFocused?: boolean
value
Public propertysignature
value?: string