InputOptions
Defined in: ui/Input.ts:156
Main configuration options for the Input component InputOptions
Example
Section titled “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
Section titled “Extends”Partial
<TextProps
>
Indexable
Section titled “Indexable”[key
: string
]: any
Properties
Section titled “Properties”alpha?
Section titled “alpha?”
optional
alpha:number
Defined in: mixins/factory/props.ts:34
Inherited from
Section titled “Inherited from”Partial.alpha
anchor?
Section titled “anchor?”
optional
anchor:PointLike
Defined in: mixins/factory/props.ts:126
Inherited from
Section titled “Inherited from”Partial.anchor
bg:
Partial
<BgStyleOptions
>
Defined in: ui/Input.ts:178
Background style configuration
blurOnEnter
Section titled “blurOnEnter”blurOnEnter:
boolean
Defined in: ui/Input.ts:174
Whether to blur on Enter key
caret:
Partial
<ColorOptions
>
Defined in: ui/Input.ts:184
Caret configuration
debug:
boolean
Defined in: ui/Input.ts:166
Enable debug mode
error?
Section titled “error?”
optional
error:object
Defined in: ui/Input.ts:186
Error state styling
optional
bg:Partial
<Omit
<BgStyleOptions
,"stroke"
>>
input?
Section titled “input?”
optional
input:object
input.fill?
Section titled “input.fill?”
optional
fill:number
fixed:
boolean
Defined in: ui/Input.ts:162
Whether the input width is fixed
focusOverlay
Section titled “focusOverlay”focusOverlay:
Partial
<FocusOverlayOptions
>
Defined in: ui/Input.ts:193
Focus overlay configuration
layout?
Section titled “layout?”
optional
layout:null
|boolean
|Omit
<LayoutOptions
,"target"
>
Defined in: mixins/factory/props.ts:39
Inherited from
Section titled “Inherited from”Partial.layout
maxLength?
Section titled “maxLength?”
optional
maxLength:number
Defined in: ui/Input.ts:172
Maximum length of input
minWidth
Section titled “minWidth”minWidth:
number
Defined in: ui/Input.ts:168
Minimum width of the input
padding
Section titled “padding”padding:
Padding
Defined in: ui/Input.ts:170
Padding configuration
pattern
Section titled “pattern”pattern:
string
Defined in: ui/Input.ts:164
Pattern for input validation
placeholder
Section titled “placeholder”placeholder:
Partial
<PlaceholderOptions
&ColorOptions
&ExtraPlaceholderOptions
>
Defined in: ui/Input.ts:180
Placeholder configuration
position?
Section titled “position?”
optional
position:PointLike
Defined in: mixins/factory/props.ts:20
Inherited from
Section titled “Inherited from”Partial.position
regex?
Section titled “regex?”
optional
regex:RegExp
Defined in: ui/Input.ts:176
Custom regex for validation
resolution?
Section titled “resolution?”
optional
resolution:number
Defined in: mixins/factory/props.ts:127
Inherited from
Section titled “Inherited from”Partial.resolution
roundPixels?
Section titled “roundPixels?”
optional
roundPixels:boolean
Defined in: mixins/factory/props.ts:128
Inherited from
Section titled “Inherited from”Partial.roundPixels
scale?
Section titled “scale?”
optional
scale:PointLike
Defined in: mixins/factory/props.ts:26
Inherited from
Section titled “Inherited from”Partial.scale
scaleX?
Section titled “scaleX?”
optional
scaleX:number
Defined in: mixins/factory/props.ts:24
Inherited from
Section titled “Inherited from”Partial.scaleX
scaleY?
Section titled “scaleY?”
optional
scaleY:number
Defined in: mixins/factory/props.ts:25
Inherited from
Section titled “Inherited from”Partial.scaleY
selection
Section titled “selection”selection:
Partial
<ColorOptions
>
Defined in: ui/Input.ts:182
Selection highlight configuration
style?
Section titled “style?”
optional
style:Partial
<TextStyleOptions
>
Defined in: mixins/factory/props.ts:129
Inherited from
Section titled “Inherited from”Partial.style
optional
text:string
Defined in: mixins/factory/props.ts:125
Inherited from
Section titled “Inherited from”Partial.text
type:
"number"
|"text"
|"password"
|"email"
|"tel"
|"url"
Defined in: ui/Input.ts:160
Input type (text, password, number, etc.)
value:
string
Defined in: ui/Input.ts:158
Initial value of the input
visible?
Section titled “visible?”
optional
visible:boolean
Defined in: mixins/factory/props.ts:35
Inherited from
Section titled “Inherited from”Partial.visible
optional
x:number
Defined in: mixins/factory/props.ts:18
Inherited from
Section titled “Inherited from”Partial.x
optional
y:number
Defined in: mixins/factory/props.ts:19
Inherited from
Section titled “Inherited from”Partial.y