# TextInputArgs

Interface · extends [`InputElementArgs`](https://api.playcanvas.com/pcui/interfaces/InputElementArgs.md)`<string>`, [`IPlaceholderArgs`](https://api.playcanvas.com/pcui/interfaces/IPlaceholderArgs.md)

Source: https://github.com/playcanvas/pcui/blob/77ed2b8ba8660c9644049b0d1942652721e7a6c4/src/components/TextInput/index.ts#L12

The arguments for the [TextInput](https://api.playcanvas.com/pcui/classes/TextInput.md) constructor.

## Properties

### onValidate

```ts
onValidate?: (value: string) => boolean
```

A function that validates the value that is entered into the input and returns `true` if it
is valid or `false` otherwise. If `false` then the input will be set in an error state and
the value will not propagate to the binding.

## Inherited from [InputElementArgs](https://api.playcanvas.com/pcui/interfaces/InputElementArgs.md)

- `alignItems?: string`
- `alignSelf?: string`
- `binding?: BindingBase`
- `blurOnEnter?: boolean`
- `blurOnEscape?: boolean`
- `class?: string | string[]`
- `dom?: string | HTMLElement`
- `enabled?: boolean`
- `error?: boolean`
- `flexBasis?: string | number`
- `flexDirection?: string`
- `flexGrow?: string | number`
- `flexShrink?: string | number`
- `flexWrap?: string`
- `height?: number`
- `hidden?: boolean`
- `id?: string`
- `ignoreParent?: boolean`
- `input?: HTMLInputElement`
- `isRoot?: boolean`
- `justifyContent?: string`
- `justifySelf?: string`
- `keyChange?: boolean`
- `link?: { observer: Observer | Observer[]; path: string | string[] }`
- `onChange?: (value: string) => void`
- `onClick?: () => void`
- `onRemove?: () => void`
- `parent?: Element`
- `placeholder?: string`
- `readOnly?: boolean`
- `renderChanges?: boolean`
- `style?: string`
- `tabIndex?: number`
- `value?: string`
- `values?: string[]`
- `width?: number`
