Skip to content

API Class UITextArea

github-actions[bot] edited this page Nov 29, 2026 · 7 revisions

Class: UITextArea

Defined in: src/engine/ui/components.ts:912

ADR 0428: a multi-line text field (HTML's <textarea>): an input field whose Enter starts a new line, whose text wraps at its width (wrap soft) and which scrolls (ADR 0427) when its text is taller than its rows.

Extends

Constructors

Constructor

new UITextArea(): UITextArea;

Defined in: src/engine/ui/components.ts:918

Returns

UITextArea

Overrides

UIInputField.constructor

Properties

alignContent

alignContent: UIAlignContent = "stretch";

Defined in: src/engine/ui/components.ts:223

How wrapped lines share the space across the direction (only with flexWrap).

Inherited from

UIInputField.alignContent


alignItems

alignItems: UIAlign = "stretch";

Defined in: src/engine/ui/components.ts:148

Inherited from

UIInputField.alignItems


alignSelf

alignSelf: UIAlignSelf = "auto";

Defined in: src/engine/ui/components.ts:221

This element's alignment across its parent's direction; auto takes the parent's alignItems.

Inherited from

UIInputField.alignSelf


aspectRatio

aspectRatio: number = 0;

Defined in: src/engine/ui/components.ts:232

Width divided by height, kept when only one of them is set (aspect-ratio: 16 / 9); 0: none.

Inherited from

UIInputField.aspectRatio


backdropBlur

backdropBlur: number = 0;

Defined in: src/engine/ui/components.ts:370

Inherited from

UIInputField.backdropBlur


backdropBrightness

backdropBrightness: number = 1;

Defined in: src/engine/ui/components.ts:371

Inherited from

UIInputField.backdropBrightness


backdropContrast

backdropContrast: number = 1;

Defined in: src/engine/ui/components.ts:372

Inherited from

UIInputField.backdropContrast


backdropDropShadowBlur

backdropDropShadowBlur: number = 0;

Defined in: src/engine/ui/components.ts:382

Inherited from

UIInputField.backdropDropShadowBlur


backdropDropShadowColor

backdropDropShadowColor: Color | null = null;

Defined in: src/engine/ui/components.ts:379

Inherited from

UIInputField.backdropDropShadowColor


backdropDropShadowOffsetX

backdropDropShadowOffsetX: number = 0;

Defined in: src/engine/ui/components.ts:380

Inherited from

UIInputField.backdropDropShadowOffsetX


backdropDropShadowOffsetY

backdropDropShadowOffsetY: number = 0;

Defined in: src/engine/ui/components.ts:381

Inherited from

UIInputField.backdropDropShadowOffsetY


backdropGrayscale

backdropGrayscale: number = 0;

Defined in: src/engine/ui/components.ts:373

Inherited from

UIInputField.backdropGrayscale


backdropHueRotate

backdropHueRotate: number = 0;

Defined in: src/engine/ui/components.ts:374

Inherited from

UIInputField.backdropHueRotate


backdropInvert

backdropInvert: number = 0;

Defined in: src/engine/ui/components.ts:375

Inherited from

UIInputField.backdropInvert


backdropOpacity

backdropOpacity: number = 1;

Defined in: src/engine/ui/components.ts:376

Inherited from

UIInputField.backdropOpacity


backdropSaturate

backdropSaturate: number = 1;

Defined in: src/engine/ui/components.ts:377

Inherited from

UIInputField.backdropSaturate


backdropSepia

backdropSepia: number = 0;

Defined in: src/engine/ui/components.ts:378

Inherited from

UIInputField.backdropSepia


backgroundColor

backgroundColor: Color | null = null;

Defined in: src/engine/ui/components.ts:389

Null: transparent.

Inherited from

UIInputField.backgroundColor


backgroundImage

backgroundImage: string = "";

Defined in: src/engine/ui/components.ts:416

Drawn over the background: url(asset:images/wood.png) (stretched to the box), linear-gradient(angle, stops…) or radial-gradient(stops…) (a circle at the centre), stops being a colour and an optional position in %. A gradient replaces backgroundColor. Empty: none.

Inherited from

UIInputField.backgroundImage


borderBottomLeftRadius

borderBottomLeftRadius: number = -1;

Defined in: src/engine/ui/components.ts:410

Inherited from

UIInputField.borderBottomLeftRadius


borderBottomRightRadius

borderBottomRightRadius: number = -1;

Defined in: src/engine/ui/components.ts:409

Inherited from

UIInputField.borderBottomRightRadius


borderBottomWidth

borderBottomWidth: number | null = null;

Defined in: src/engine/ui/components.ts:399

Inherited from

UIInputField.borderBottomWidth


borderColor

borderColor: Color = Color.black;

Defined in: src/engine/ui/components.ts:394

Inherited from

UIInputField.borderColor


borderLeftWidth

borderLeftWidth: number | null = null;

Defined in: src/engine/ui/components.ts:400

Inherited from

UIInputField.borderLeftWidth


borderRadius

borderRadius: number = 0;

Defined in: src/engine/ui/components.ts:391

Every corner's radius, for the corners whose own radius below is -1.

Inherited from

UIInputField.borderRadius


borderRightWidth

borderRightWidth: number | null = null;

Defined in: src/engine/ui/components.ts:398

Inherited from

UIInputField.borderRightWidth


borderTopLeftRadius

borderTopLeftRadius: number = -1;

Defined in: src/engine/ui/components.ts:407

One corner's radius in UI pixels; -1 (the default) takes borderRadius. A stylesheet's border-radius with two to four values sets these, as CSS does (top-left, top-right, bottom-right, bottom-left).

Inherited from

UIInputField.borderTopLeftRadius


borderTopRightRadius

borderTopRightRadius: number = -1;

Defined in: src/engine/ui/components.ts:408

Inherited from

UIInputField.borderTopRightRadius


borderTopWidth

borderTopWidth: number | null = null;

Defined in: src/engine/ui/components.ts:397

The border's width on one side (border-top-width …). Null (the default): borderWidth. Unequal sides draw each side as its own edge.

Inherited from

UIInputField.borderTopWidth


borderWidth

borderWidth: number = 0;

Defined in: src/engine/ui/components.ts:393

The border's width on every side (border-width takes one to four values; border a width, solid or none, and a colour).

Inherited from

UIInputField.borderWidth


bottom

bottom: UILength = "auto";

Defined in: src/engine/ui/components.ts:162

Inherited from

UIInputField.bottom


boxShadowBlur

boxShadowBlur: number = 0;

Defined in: src/engine/ui/components.ts:427

How far the shadow blurs, in UI pixels (CSS's blur radius).

Inherited from

UIInputField.boxShadowBlur


boxShadowColor

boxShadowColor: Color | null = null;

Defined in: src/engine/ui/components.ts:421

A shadow under the background, box-shadow: offset-x offset-y blur colour in a stylesheet (ADR 0422). It's drawn by the background, so a panel without a backgroundColor or gradient casts none. Null: no shadow.

Inherited from

UIInputField.boxShadowColor


boxShadowOffsetX

boxShadowOffsetX: number = 0;

Defined in: src/engine/ui/components.ts:423

The shadow's offset to the right, in UI pixels.

Inherited from

UIInputField.boxShadowOffsetX


boxShadowOffsetY

boxShadowOffsetY: number = 0;

Defined in: src/engine/ui/components.ts:425

The shadow's offset down, in UI pixels.

Inherited from

UIInputField.boxShadowOffsetY


color

color: Color = Color.white;

Defined in: src/engine/ui/components.ts:846

Inherited from

UIInputField.color


direction

direction: UIDirection | null = null;

Defined in: src/engine/ui/components.ts:299

ADR 0432: its direction (CSS direction, HTML dir); null (the default) takes its parent's, and a canvas is ltr. In rtl a row lays out from the right and a scroller's horizontal scrolling starts at the right: scrollX is 0 there and negative toward the left, as browsers' scrollLeft. A text's base direction (its runs' order, start/end alignment) is its own or an ancestor's direction when one is set, else the language's.

Inherited from

UIInputField.direction


display

display: UIDisplay = "flex";

Defined in: src/engine/ui/components.ts:175

none removes the element and its children from layout, drawing and the pointer, like CSS display: none, while its node stays active (its scripts run, and its state reads as before). flex (the default) lays it out.

Inherited from

UIInputField.display


draggable

draggable: boolean = false;

Defined in: src/engine/ui/components.ts:305

ADR 0426: a pointer press on it (or inside it) that moves starts a UI drag: dragstart on it, drag while it moves, dragenter/dragover/dragleave on the elements under the pointer, drop where it's released (if a dragover there was prevented), then dragend. HTML's draggable attribute.

Inherited from

UIInputField.draggable


filterBlur

filterBlur: number = 0;

Defined in: src/engine/ui/components.ts:343

blur(): a Gaussian blur, its standard deviation in UI pixels. 0: none.

Inherited from

UIInputField.filterBlur


filterBrightness

filterBrightness: number = 1;

Defined in: src/engine/ui/components.ts:345

brightness(): 1 as it is, 0 black, above 1 brighter.

Inherited from

UIInputField.filterBrightness


filterContrast

filterContrast: number = 1;

Defined in: src/engine/ui/components.ts:347

contrast(): 1 as it is, 0 flat grey.

Inherited from

UIInputField.filterContrast


filterDropShadowBlur

filterDropShadowBlur: number = 0;

Defined in: src/engine/ui/components.ts:365

Inherited from

UIInputField.filterDropShadowBlur


filterDropShadowColor

filterDropShadowColor: Color | null = null;

Defined in: src/engine/ui/components.ts:361

drop-shadow()'s colour: a shadow of what's drawn (its shape, not its box). Null: none.

Inherited from

UIInputField.filterDropShadowColor


filterDropShadowOffsetX

filterDropShadowOffsetX: number = 0;

Defined in: src/engine/ui/components.ts:363

The drop shadow's offset right and down, and its blur, in UI pixels.

Inherited from

UIInputField.filterDropShadowOffsetX


filterDropShadowOffsetY

filterDropShadowOffsetY: number = 0;

Defined in: src/engine/ui/components.ts:364

Inherited from

UIInputField.filterDropShadowOffsetY


filterGrayscale

filterGrayscale: number = 0;

Defined in: src/engine/ui/components.ts:349

grayscale(): 0 as it is, 1 fully grey.

Inherited from

UIInputField.filterGrayscale


filterHueRotate

filterHueRotate: number = 0;

Defined in: src/engine/ui/components.ts:351

hue-rotate(), in degrees.

Inherited from

UIInputField.filterHueRotate


filterInvert

filterInvert: number = 0;

Defined in: src/engine/ui/components.ts:353

invert(): 0 as it is, 1 inverted.

Inherited from

UIInputField.filterInvert


filterOpacity

filterOpacity: number = 1;

Defined in: src/engine/ui/components.ts:355

opacity(): like opacity, applied as a filter step (after the ones before it). 1 as it is.

Inherited from

UIInputField.filterOpacity


filterSaturate

filterSaturate: number = 1;

Defined in: src/engine/ui/components.ts:357

saturate(): 1 as it is, 0 grey, above 1 more saturated.

Inherited from

UIInputField.filterSaturate


filterSepia

filterSepia: number = 0;

Defined in: src/engine/ui/components.ts:359

sepia(): 0 as it is, 1 fully sepia.

Inherited from

UIInputField.filterSepia


flexBasis

flexBasis: UILength = "auto";

Defined in: src/engine/ui/components.ts:230

Its size along the parent's direction before growing and shrinking: pixels, a percentage, or "auto" (its width/height).

Inherited from

UIInputField.flexBasis


flexDirection

flexDirection: UIFlexDirection = "row";

Defined in: src/engine/ui/components.ts:146

How this element lays out its children.

Inherited from

UIInputField.flexDirection


flexGrow

flexGrow: number = 0;

Defined in: src/engine/ui/components.ts:165

How much of the parent's free space this element takes, relative to its siblings.

Inherited from

UIInputField.flexGrow


flexShrink

flexShrink: number | null = null;

Defined in: src/engine/ui/components.ts:228

How much this element shrinks, relative to its siblings, when they don't fit. Null (the default): its kind's, as before: text shrinks (and wraps to what's left), other elements keep their size.

Inherited from

UIInputField.flexShrink


flexWrap

flexWrap: UIFlexWrap = "nowrap";

Defined in: src/engine/ui/components.ts:219

Whether children that don't fit on one line wrap onto more (wrap-reverse: new lines go before the first).

Inherited from

UIInputField.flexWrap


focusable

focusable: boolean = true;

Defined in: src/engine/ui/components.ts:738

False takes it out of focus: navigation skips it and a click doesn't focus it.

Inherited from

UIInputField.focusable


focusColor

focusColor: Color;

Defined in: src/engine/ui/components.ts:745

Drawn while it has focus and the last UI input was navigation, not the pointer.

Inherited from

UIInputField.focusColor


font

font: string = "";

Defined in: src/engine/ui/components.ts:844

A font file in the project, as UIText.font; empty is the bundled Inter. The text is drawn at weight 400.

Inherited from

UIInputField.font


fontSize

fontSize: number = 16;

Defined in: src/engine/ui/components.ts:845

Inherited from

UIInputField.fontSize


gap

gap: number = 0;

Defined in: src/engine/ui/components.ts:150

Space between children.

Inherited from

UIInputField.gap


height

height: UILength = "auto";

Defined in: src/engine/ui/components.ts:157

Inherited from

UIInputField.height


inert

inert: boolean = false;

Defined in: src/engine/ui/components.ts:196

HTML's inert: the element and everything inside it are drawn as before but take no part in interaction: the pointer passes through them (to what's behind), and they can't take focus or be navigated to (focus inside leaves). Svelte's outros set it on outroing elements.

Inherited from

UIInputField.inert


interactable

interactable: boolean = true;

Defined in: src/engine/ui/components.ts:743

False: it ignores the pointer (it still blocks it from the game), can't take focus, and matches :disabled (HTML's disabled attribute sets it false). ADR 0428: every control has it (buttons, fields, checkboxes, sliders, selects…).

Inherited from

UIInputField.interactable


justifyContent

justifyContent: UIJustify = "flex-start";

Defined in: src/engine/ui/components.ts:147

Inherited from

UIInputField.justifyContent


left

left: UILength = "auto";

Defined in: src/engine/ui/components.ts:163

Inherited from

UIInputField.left


margin

margin: number = 0;

Defined in: src/engine/ui/components.ts:154

Space around the element, on every side.

Inherited from

UIInputField.margin


marginBottom

marginBottom: number | null = null;

Defined in: src/engine/ui/components.ts:210

Inherited from

UIInputField.marginBottom


marginLeft

marginLeft: number | null = null;

Defined in: src/engine/ui/components.ts:211

Inherited from

UIInputField.marginLeft


marginRight

marginRight: number | null = null;

Defined in: src/engine/ui/components.ts:209

Inherited from

UIInputField.marginRight


marginTop

marginTop: number | null = null;

Defined in: src/engine/ui/components.ts:208

Space around the element on one side (margin-top …; the margin shorthand takes one to four values). Null: margin.

Inherited from

UIInputField.marginTop


max

max: number | null = null;

Defined in: src/engine/ui/components.ts:862

Inherited from

UIInputField.max


maxHeight

maxHeight: UILength = "none";

Defined in: src/engine/ui/components.ts:217

Inherited from

UIInputField.maxHeight


maxLength

maxLength: number = 0;

Defined in: src/engine/ui/components.ts:842

0: no limit.

Inherited from

UIInputField.maxLength


maxWidth

maxWidth: UILength = "none";

Defined in: src/engine/ui/components.ts:216

The largest size layout gives it: pixels, a percentage of the parent, or "none" (no maximum).

Inherited from

UIInputField.maxWidth


min

min: number | null = null;

Defined in: src/engine/ui/components.ts:861

ADR 0428, number fields: the lowest and highest values the arrow keys step to (null: no limit), and the step.

Inherited from

UIInputField.min


minHeight

minHeight: UILength = "auto";

Defined in: src/engine/ui/components.ts:214

Inherited from

UIInputField.minHeight


minWidth

minWidth: UILength = "auto";

Defined in: src/engine/ui/components.ts:213

The smallest size layout gives it: pixels, a percentage of the parent, or "auto" (no minimum).

Inherited from

UIInputField.minWidth


navDown

navDown: GameObject | null = null;

Defined in: src/engine/ui/components.ts:750

Inherited from

UIInputField.navDown


navigation

navigation: UINavigationMode = "auto";

Defined in: src/engine/ui/components.ts:747

auto: explicit neighbours, else the nearest element that way; explicit: neighbours only; none: navigate doesn't leave it.

Inherited from

UIInputField.navigation


navLeft

navLeft: GameObject | null = null;

Defined in: src/engine/ui/components.ts:751

Inherited from

UIInputField.navLeft


navRight

navRight: GameObject | null = null;

Defined in: src/engine/ui/components.ts:752

Inherited from

UIInputField.navRight


navUp

navUp: GameObject | null = null;

Defined in: src/engine/ui/components.ts:749

Explicit neighbours: where navigate up, down, left and right goes from here (null: the search, in auto).

Inherited from

UIInputField.navUp


opacity

opacity: number = 1;

Defined in: src/engine/ui/components.ts:167

0..1, multiplied into its children's.

Inherited from

UIInputField.opacity


overflow

overflow: UIOverflow = "visible";

Defined in: src/engine/ui/components.ts:240

hidden clips its children to its padding box (inside its border): they are drawn and take the pointer only there. It also draws them together, at its own place in the order (as an element with a zIndex does). auto and scroll clip them the same way and scroll them (ADR 0427): by the wheel, a touch or pen drag, the keyboard, a draggable scrollbar, navigation and scrollX/scrollY. The stylesheet's overflow: x y sets the two axes (overflowX, overflowY).

Inherited from

UIInputField.overflow


overflowX

overflowX: UIOverflow | null = null;

Defined in: src/engine/ui/components.ts:242

ADR 0427: the horizontal axis's overflow (overflow-x); null (the default) takes overflow.

Inherited from

UIInputField.overflowX


overflowY

overflowY: UIOverflow | null = null;

Defined in: src/engine/ui/components.ts:244

ADR 0427: the vertical axis's overflow (overflow-y); null takes overflow.

Inherited from

UIInputField.overflowY


overscrollBehavior

overscrollBehavior: UIOverscrollBehavior = "auto";

Defined in: src/engine/ui/components.ts:257

ADR 0427: contain or none: once it can't scroll further, the wheel and drags don't go on to scroll its ancestors.

Inherited from

UIInputField.overscrollBehavior


padding

padding: number = 0;

Defined in: src/engine/ui/components.ts:152

Space inside the element, on every side.

Inherited from

UIInputField.padding


paddingBottom

paddingBottom: number | null = null;

Defined in: src/engine/ui/components.ts:205

Inherited from

UIInputField.paddingBottom


paddingLeft

paddingLeft: number | null = null;

Defined in: src/engine/ui/components.ts:206

Inherited from

UIInputField.paddingLeft


paddingRight

paddingRight: number | null = null;

Defined in: src/engine/ui/components.ts:204

Inherited from

UIInputField.paddingRight


paddingTop

paddingTop: number | null = null;

Defined in: src/engine/ui/components.ts:203

Space inside the element on one side (padding-top …; the padding shorthand takes one to four values, as in CSS). Null (the default): padding, the all-sides value.

Inherited from

UIInputField.paddingTop


placeholder

placeholder: string = "";

Defined in: src/engine/ui/components.ts:840

Inherited from

UIInputField.placeholder


placeholderColor

placeholderColor: Color;

Defined in: src/engine/ui/components.ts:848

The placeholder's colour: browsers' default, darkgray (#a9a9a9, Chromium's user-agent stylesheet), legible on light and dark fields.

Inherited from

UIInputField.placeholderColor


placeholderFontStyle

placeholderFontStyle: UIFontStyle = "normal";

Defined in: src/engine/ui/components.ts:850

ADR 0432: the placeholder's slant (::placeholder's font-style): italic or oblique draw it italic.

Inherited from

UIInputField.placeholderFontStyle


positionType

positionType: UIPositionType = "relative";

Defined in: src/engine/ui/components.ts:159

absolute takes the element out of its parent's flow, placed by top/right/bottom/left.

Inherited from

UIInputField.positionType


raycastTarget

raycastTarget: boolean = true;

Defined in: src/engine/ui/components.ts:190

Whether the pointer stops at this element, like Unity's Graphic.raycastTarget (ADR 0385). True (the default): a press over it goes to the UI, never to the game (Input.pointerOverUI is true), and reaches the button or input field it's in, if any; over text, an image or a panel outside one, it does nothing. False: the pointer passes through to whatever is behind it (other UI, or the game). Text, images, buttons and input fields stop it; a panel only when it draws a background (even a transparent one) or a border, as a panel without either is a layout box (Unity's empty RectTransform). Children aren't affected: each element has its own.

Inherited from

UIInputField.raycastTarget


right

right: UILength = "auto";

Defined in: src/engine/ui/components.ts:161

Inherited from

UIInputField.right


rotate

rotate: number = 0;

Defined in: src/engine/ui/components.ts:326

How far it's drawn turned clockwise about its transform origin, in degrees (rotate: 45deg, 0.25turn, 1rad).

Inherited from

UIInputField.rotate


rows

rows: number = 2;

Defined in: src/engine/ui/components.ts:914

Its height in lines when height is auto.


scaleX

scaleX: number = 1;

Defined in: src/engine/ui/components.ts:323

How much it's drawn stretched across (scale: 2 sets both; scale: 2 1 each), about its transform origin. 1: as laid out.

Inherited from

UIInputField.scaleX


scaleY

scaleY: number = 1;

Defined in: src/engine/ui/components.ts:324

Inherited from

UIInputField.scaleY


scrollbarGutter

scrollbarGutter: UIScrollbarGutter = "auto";

Defined in: src/engine/ui/components.ts:269

ADR 0432: whether the vertical scrollbar's space is kept (scrollbar-gutter): auto draws the bar over the content; stable (on an element that clips) reserves it beside the padding box, on the bar's side, whether or not the bar shows, so clientWidth is smaller and the content doesn't move when it appears; stable both-edges on both sides.

Inherited from

UIInputField.scrollbarGutter


scrollbarThumbColor

scrollbarThumbColor: Color | null = null;

Defined in: src/engine/ui/components.ts:261

ADR 0427: its scrollbars' thumb colour (scrollbar-color: thumb track); null: the default, a light grey.

Inherited from

UIInputField.scrollbarThumbColor


scrollbarTrackColor

scrollbarTrackColor: Color | null = null;

Defined in: src/engine/ui/components.ts:263

ADR 0427: its scrollbars' track colour; null: the default, a faint dark strip.

Inherited from

UIInputField.scrollbarTrackColor


scrollbarWidth

scrollbarWidth: UIScrollbarWidth = "auto";

Defined in: src/engine/ui/components.ts:259

ADR 0427: its scrollbars' thickness (scrollbar-width): auto, thin or none.

Inherited from

UIInputField.scrollbarWidth


scrollBehavior

scrollBehavior: UIScrollBehavior = "auto";

Defined in: src/engine/ui/components.ts:255

ADR 0427: smooth animates scripted scrolling (scrollTo, scrollBy, scrollIntoView and navigation's); auto jumps.

Inherited from

UIInputField.scrollBehavior


scrollMarginBottom

scrollMarginBottom: number = 0;

Defined in: src/engine/ui/components.ts:292

Inherited from

UIInputField.scrollMarginBottom


scrollMarginLeft

scrollMarginLeft: number = 0;

Defined in: src/engine/ui/components.ts:293

Inherited from

UIInputField.scrollMarginLeft


scrollMarginRight

scrollMarginRight: number = 0;

Defined in: src/engine/ui/components.ts:291

Inherited from

UIInputField.scrollMarginRight


scrollMarginTop

scrollMarginTop: number = 0;

Defined in: src/engine/ui/components.ts:290

ADR 0432: this element's snap area outset from its border box (scroll-margin), UI pixels per side.

Inherited from

UIInputField.scrollMarginTop


scrollPaddingBottom

scrollPaddingBottom: number = 0;

Defined in: src/engine/ui/components.ts:287

Inherited from

UIInputField.scrollPaddingBottom


scrollPaddingLeft

scrollPaddingLeft: number = 0;

Defined in: src/engine/ui/components.ts:288

Inherited from

UIInputField.scrollPaddingLeft


scrollPaddingRight

scrollPaddingRight: number = 0;

Defined in: src/engine/ui/components.ts:286

Inherited from

UIInputField.scrollPaddingRight


scrollPaddingTop

scrollPaddingTop: number = 0;

Defined in: src/engine/ui/components.ts:285

ADR 0432: a scroller's snapport inset from its padding box (scroll-padding), UI pixels per side.

Inherited from

UIInputField.scrollPaddingTop


scrollSnapAlignBlock

scrollSnapAlignBlock: UIScrollSnapAlign = "none";

Defined in: src/engine/ui/components.ts:279

ADR 0432: how this element lines up in its scroller when snapped, vertically (scroll-snap-align's first value).

Inherited from

UIInputField.scrollSnapAlignBlock


scrollSnapAlignInline

scrollSnapAlignInline: UIScrollSnapAlign = "none";

Defined in: src/engine/ui/components.ts:281

ADR 0432: …and horizontally (scroll-snap-align's second value; one value sets both).

Inherited from

UIInputField.scrollSnapAlignInline


scrollSnapAxis

scrollSnapAxis: UIScrollSnapAxis = "none";

Defined in: src/engine/ui/components.ts:275

ADR 0432: CSS Scroll Snap on a scroller (scroll-snap-type: <axis> [mandatory | proximity]): the axes it snaps on. After the wheel settles, a touch drag's momentum, keys, scrollTo/scrollBy, scrollIntoView and navigation, it rests where a descendant's scroll-snap-align says; after a layout change it snaps again.

Inherited from

UIInputField.scrollSnapAxis


scrollSnapStop

scrollSnapStop: UIScrollSnapStop = "normal";

Defined in: src/engine/ui/components.ts:283

ADR 0432: always: a scroll gesture stops at this element's snap position rather than passing over it.

Inherited from

UIInputField.scrollSnapStop


scrollSnapStrictness

scrollSnapStrictness: UIScrollSnapStrictness = "proximity";

Defined in: src/engine/ui/components.ts:277

ADR 0432: mandatory always rests on a snap position; proximity (the default) only near one.

Inherited from

UIInputField.scrollSnapStrictness


scrollX

scrollX: number = 0;

Defined in: src/engine/ui/components.ts:252

ADR 0427: how far its content is scrolled right and down, in UI pixels (scrollLeft/scrollTop on the web). Scripts write them; the UI core keeps them between 0 and how far the content reaches past its padding box, at each layout. Only an element that clips (overflow other than visible) scrolls. ADR 0432: an axis whose content starts at its far end (row-reverse, column-reverse, direction: rtl) is 0 showing that end and negative toward the other, as CSSOM's offsets are.

Inherited from

UIInputField.scrollX


scrollY

scrollY: number = 0;

Defined in: src/engine/ui/components.ts:253

Inherited from

UIInputField.scrollY


selectionBackgroundColor

selectionBackgroundColor: Color | null = null;

Defined in: src/engine/ui/components.ts:854

ADR 0432: painted behind selected text while typing (::selection's background-color); null: the default highlight.

Inherited from

UIInputField.selectionBackgroundColor


selectionColor

selectionColor: Color | null = null;

Defined in: src/engine/ui/components.ts:852

ADR 0432: selected text's colour while typing (::selection's color); null keeps the text's.

Inherited from

UIInputField.selectionColor


step

step: number = 1;

Defined in: src/engine/ui/components.ts:863

Inherited from

UIInputField.step


top

top: UILength = "auto";

Defined in: src/engine/ui/components.ts:160

Inherited from

UIInputField.top


transformMatrix

transformMatrix: string = "";

Defined in: src/engine/ui/components.ts:338

ADR 0430: a full 2D matrix applied after translate, rotate and scale, as matrix(a, b, c, d, e, f) (pixels); "" (the default) for none. A stylesheet's transform list that doesn't fold into the three (one with skew(), skewX(), skewY() or matrix(), or a rotation after an unequal scale) sets it. It animates as CSS interpolates matrices.

Inherited from

UIInputField.transformMatrix


transformOriginX

transformOriginX: UILength = "50%";

Defined in: src/engine/ui/components.ts:331

The point it turns and scales about, across its own box: pixels from its left edge, or a percentage of its width (transform-origin: left top, 25% 75%, 10px 4px). Default: the middle.

Inherited from

UIInputField.transformOriginX


transformOriginY

transformOriginY: UILength = "50%";

Defined in: src/engine/ui/components.ts:332

Inherited from

UIInputField.transformOriginY


translateX

translateX: UILength = "0";

Defined in: src/engine/ui/components.ts:319

How far the element is drawn moved right: pixels, or a percentage of its own width ("50%"). A stylesheet's translate: x y or transform: translate(x, y) sets it with translateY. (The translate attribute stays HTML's localisation marker: in markup write transform="translate(…)" or translate-x.)

Inherited from

UIInputField.translateX


translateY

translateY: UILength = "0";

Defined in: src/engine/ui/components.ts:321

How far it's drawn moved down: pixels, or a percentage of its own height.

Inherited from

UIInputField.translateY


type

type: UIInputType = "text";

Defined in: src/engine/ui/components.ts:859

ADR 0428: text; password, drawn as dots; or number, whose arrow keys (while typing) step value by step between min and max. The value stays text, as on the web.

Inherited from

UIInputField.type


value

value: string = "";

Defined in: src/engine/ui/components.ts:839

Inherited from

UIInputField.value


verticalAlign

verticalAlign: UIVerticalAlign = "baseline";

Defined in: src/engine/ui/components.ts:181

Its place on a text's line (vertical-align), as an inline run or (ADR 0432) an atomic inline box: sub and super lower and raise its baseline; middle, top, bottom, text-top, text-bottom align its box. Outside a text it does nothing.

Inherited from

UIInputField.verticalAlign


visible

visible: boolean = true;

Defined in: src/engine/ui/components.ts:169

False hides the element and its children but keeps its space (a disabled component or inactive node takes none).

Inherited from

UIInputField.visible


width

width: UILength = "auto";

Defined in: src/engine/ui/components.ts:156

Pixels (120), a percentage of the parent ("50%") or "auto" (sized by its content).

Inherited from

UIInputField.width


wrap

wrap: UITextAreaWrap = "soft";

Defined in: src/engine/ui/components.ts:916

soft: lines wrap at its width; off: only at line breaks.


zIndex

zIndex: number = 0;

Defined in: src/engine/ui/components.ts:310

Draw and pointer order among its siblings (higher on top, then document order), as in CSS. A non-zero value draws the element and its children together, ordered within it.

Inherited from

UIInputField.zIndex

Accessors

changed

Get Signature

get changed(): boolean;

Defined in: src/engine/ui/components.ts:775

ADR 0428: true for the one frame the player changed it (typed, toggled, dragged, chose), in every phase of that frame; a script's write never counts.

Returns

boolean

Inherited from

UIInputField.changed


enabled

Get Signature

get enabled(): boolean;

Defined in: src/engine/core/Component.ts:62

Returns

boolean

Set Signature

set enabled(value): void;

Defined in: src/engine/core/Component.ts:66

Parameters
value

boolean

Returns

void

Inherited from

UIInputField.enabled


focused

Get Signature

get focused(): boolean;

Defined in: src/engine/ui/components.ts:880

True while it has focus. Set it to focus the field and start typing in it (as a click does), or to unfocus it; one element in a World has focus, so focusing one unfocuses the others.

Returns

boolean

Set Signature

set focused(value): void;

Defined in: src/engine/ui/components.ts:884

True while it has focus (a click, a script or navigation gave it). Set it to focus or unfocus it.

Parameters
value

boolean

Returns

void

Inherited from

UIInputField.focused


focusedChanged

Get Signature

get focusedChanged(): boolean;

Defined in: src/engine/ui/components.ts:768

True for the one frame the player (the pointer or navigation) gave it focus or took it away, in every phase of that frame.

Returns

boolean

Inherited from

UIInputField.focusedChanged


gameObject

Get Signature

get gameObject(): GameObject;

Defined in: src/engine/core/Component.ts:42

Unity-style alias for node.

Returns

GameObject

Inherited from

UIInputField.gameObject


isActiveAndEnabled

Get Signature

get isActiveAndEnabled(): boolean;

Defined in: src/engine/core/Component.ts:73

True when enabled, the node is active in the hierarchy, and the node is in a loaded world.

Returns

boolean

Inherited from

UIInputField.isActiveAndEnabled


node

Get Signature

get node(): GameObject;

Defined in: src/engine/core/Component.ts:37

The node this component is on.

Returns

GameObject

Inherited from

UIInputField.node


owner

Get Signature

get owner(): GameObject;

Defined in: src/engine/core/Component.ts:50

The node this component acts for: the node itself when attached directly, or the parent node when this component lives on a component node (ADR 0009).

Returns

GameObject

Inherited from

UIInputField.owner


submitted

Get Signature

get submitted(): boolean;

Defined in: src/engine/ui/components.ts:897

True for the one frame Enter was pressed in the field while typing (never in a UITextArea, where Enter starts a line).

Returns

boolean

Inherited from

UIInputField.submitted


time

Get Signature

get time(): Readonly<TimeState>;

Defined in: src/engine/core/Component.ts:98

This component's World's clock (ADR 0032): the same values as Time, but safe to read outside the World's frame too (after an await, say).

Returns

Readonly<TimeState>

Inherited from

UIInputField.time


transform

Get Signature

get transform(): Transform;

Defined in: src/engine/core/Component.ts:56

The Transform of the node this component is on, if it has one.

Returns

Transform

Inherited from

UIInputField.transform


typing

Get Signature

get typing(): boolean;

Defined in: src/engine/ui/components.ts:892

True while it takes the keyboard: from a click, a script's focused = true or submit, until Escape, Tab or navigation leaves it.

Returns

boolean

Inherited from

UIInputField.typing


world

Get Signature

get world(): WorldHandle;

Defined in: src/engine/core/Component.ts:87

A handle on this component's World (ADR 0132): the same one Engine.findWorld returns. Load a scene into it, pause, connect or destroy it: this.world.loadScene("scenes/level2.scene.json"). Throws for a World no Engine owns.

Returns

WorldHandle

Inherited from

UIInputField.world

Methods

instantiate()

instantiate(prefabPath, options?): GameObject;

Defined in: src/engine/core/Component.ts:108

Instantiate a prefab in this component's World (ADR 0034), like GameObject.instantiate. Use it in code that may run after an await: by then the frame is over and the current World is the Engine's default one, which may not be this component's. A parent from another World throws.

Parameters

prefabPath

string

options?

InstantiateOptions = {}

Returns

GameObject

Inherited from

UIInputField.instantiate

Clone this wiki locally