Skip to content

InputOptions

Defined in: ui/Input.ts:156

Main configuration options for the Input component InputOptions

Example

const input = new Input({
value: 'Initial value',
type: 'text',
minWidth: 400,
padding: [12, 15],
placeholder: {
text: 'Enter text...',
color: 0x666666
},
bg: {
radius: 10,
stroke: { width: 2, color: 0x000000 }
},
focusOverlay: {
activeFilter: ['mobile', 'touch'],
scale: 2.5
}
});

Extends

Indexable

[key: string]: any

Properties

alpha?

optional alpha: number

Defined in: mixins/factory/props.ts:33

Inherited from

Partial.alpha


anchor?

optional anchor: PointLike

Defined in: mixins/factory/props.ts:111

Inherited from

Partial.anchor


bg

bg: Partial<BgStyleOptions>

Defined in: ui/Input.ts:178

Background style configuration


blurOnEnter

blurOnEnter: boolean

Defined in: ui/Input.ts:174

Whether to blur on Enter key


caret

caret: Partial<ColorOptions>

Defined in: ui/Input.ts:184

Caret configuration


debug

debug: boolean

Defined in: ui/Input.ts:166

Enable debug mode


error?

optional error: object

Defined in: ui/Input.ts:186

Error state styling

bg?

optional bg: Partial<Omit<BgStyleOptions, "stroke">>

input?

optional input: object

input.fill?

optional fill: number


fixed

fixed: boolean

Defined in: ui/Input.ts:162

Whether the input width is fixed


focusOverlay

focusOverlay: Partial<FocusOverlayOptions>

Defined in: ui/Input.ts:193

Focus overlay configuration


maxLength?

optional maxLength: number

Defined in: ui/Input.ts:172

Maximum length of input


minWidth

minWidth: number

Defined in: ui/Input.ts:168

Minimum width of the input


padding

padding: Padding

Defined in: ui/Input.ts:170

Padding configuration


pattern

pattern: string

Defined in: ui/Input.ts:164

Pattern for input validation


placeholder

placeholder: Partial<PlaceholderOptions & ColorOptions & ExtraPlaceholderOptions>

Defined in: ui/Input.ts:180

Placeholder configuration


position?

optional position: PointLike

Defined in: mixins/factory/props.ts:19

Inherited from

Partial.position


regex?

optional regex: RegExp

Defined in: ui/Input.ts:176

Custom regex for validation


resolution?

optional resolution: number

Defined in: mixins/factory/props.ts:112

Inherited from

Partial.resolution


roundPixels?

optional roundPixels: boolean

Defined in: mixins/factory/props.ts:113

Inherited from

Partial.roundPixels


scale?

optional scale: PointLike

Defined in: mixins/factory/props.ts:25

Inherited from

Partial.scale


scaleX?

optional scaleX: number

Defined in: mixins/factory/props.ts:23

Inherited from

Partial.scaleX


scaleY?

optional scaleY: number

Defined in: mixins/factory/props.ts:24

Inherited from

Partial.scaleY


selection

selection: Partial<ColorOptions>

Defined in: ui/Input.ts:182

Selection highlight configuration


style?

optional style: Partial<TextStyleOptions>

Defined in: mixins/factory/props.ts:114

Inherited from

Partial.style


text?

optional text: string

Defined in: mixins/factory/props.ts:110

Inherited from

Partial.text


type

type: "number" | "text" | "password" | "email" | "tel" | "url"

Defined in: ui/Input.ts:160

Input type (text, password, number, etc.)


value

value: string

Defined in: ui/Input.ts:158

Initial value of the input


visible?

optional visible: boolean

Defined in: mixins/factory/props.ts:34

Inherited from

Partial.visible


x?

optional x: number

Defined in: mixins/factory/props.ts:17

Inherited from

Partial.x


y?

optional y: number

Defined in: mixins/factory/props.ts:18

Inherited from

Partial.y