Skip to content
On this page

Interface: UITextProps

WebSG.UITextProps

Interface for the properties of a UIText element.

Hierarchy

Table of contents

Properties

Properties

alignContent

Optional alignContent: FlexAlign

The alignment of the element's content.

Inherited from

UIElementProps.alignContent

Defined in

websg.d.ts:1351


alignItems

Optional alignItems: FlexAlign

The alignment of the element's items.

Inherited from

UIElementProps.alignItems

Defined in

websg.d.ts:1355


alignSelf

Optional alignSelf: FlexAlign

The alignment of the element itself.

Inherited from

UIElementProps.alignSelf

Defined in

websg.d.ts:1359


backgroundColor

Optional backgroundColor: ArrayLike<number>

The background color of the element.

Inherited from

UIElementProps.backgroundColor

Defined in

websg.d.ts:1411


borderColor

Optional borderColor: ArrayLike<number>

The border color of the element.

Inherited from

UIElementProps.borderColor

Defined in

websg.d.ts:1415


borderRadius

Optional borderRadius: ArrayLike<number>

The border radius of the element in pixels.

Inherited from

UIElementProps.borderRadius

Defined in

websg.d.ts:1431


borderWidth

Optional borderWidth: ArrayLike<number>

The border width of the element in pixels.

Inherited from

UIElementProps.borderWidth

Defined in

websg.d.ts:1427


bottom

Optional bottom: number

The distance from the bottom edge of the parent element.

Inherited from

UIElementProps.bottom

Defined in

websg.d.ts:1339


color

Optional color: ArrayLike<number>

The color of the text as an array-like structure of [r, g, b, a] values, where each value is in the range [0, 1].

Defined in

websg.d.ts:1767


flexBasis

Optional flexBasis: number

The initial size of the element along the main axis.

Inherited from

UIElementProps.flexBasis

Defined in

websg.d.ts:1371


flexDirection

Optional flexDirection: FlexDirection

The direction of the flex layout.

Inherited from

UIElementProps.flexDirection

Defined in

websg.d.ts:1363


flexGrow

Optional flexGrow: number

The factor by which the element should grow if there is extra space.

Inherited from

UIElementProps.flexGrow

Defined in

websg.d.ts:1375


flexShrink

Optional flexShrink: number

The factor by which the element should shrink if there is not enough space.

Inherited from

UIElementProps.flexShrink

Defined in

websg.d.ts:1379


flexWrap

Optional flexWrap: FlexWrap

The wrapping behavior of the flex layout.

Inherited from

UIElementProps.flexWrap

Defined in

websg.d.ts:1367


fontFamily

Optional fontFamily: string

The font family used for the text. Any valid css font-family property value is allowed.

Defined in

websg.d.ts:1750


fontSize

Optional fontSize: number

The font size of the text in pixels.

Defined in

websg.d.ts:1772


fontStyle

Optional fontStyle: string

The font style used for the text, e.g. 'normal' or 'italic'. Any valid css font-style property value is allowed.

Defined in

websg.d.ts:1756


fontWeight

Optional fontWeight: string

The font weight used for the text, e.g. 'normal', 'bold', or a numeric value. Any valid css font-weight property value is allowed.

Defined in

websg.d.ts:1762


height

Optional height: number

The height of the element in pixels.

Inherited from

UIElementProps.height

Defined in

websg.d.ts:1391


justifyContent

Optional justifyContent: FlexJustify

The justification of the element's content.

Inherited from

UIElementProps.justifyContent

Defined in

websg.d.ts:1383


left

Optional left: number

The distance from the left edge of the parent element.

Inherited from

UIElementProps.left

Defined in

websg.d.ts:1343


margin

Optional margin: ArrayLike<number>

The margin of the element in pixels.

Inherited from

UIElementProps.margin

Defined in

websg.d.ts:1423


maxHeight

Optional maxHeight: number

The maximum height of the element in pixels.

Inherited from

UIElementProps.maxHeight

Defined in

websg.d.ts:1407


maxWidth

Optional maxWidth: number

The maximum width of the element in pixels.

Inherited from

UIElementProps.maxWidth

Defined in

websg.d.ts:1403


minHeight

Optional minHeight: number

The minimum height of the element in pixels.

Inherited from

UIElementProps.minHeight

Defined in

websg.d.ts:1399


minWidth

Optional minWidth: number

The minimum width of the element in pixels.

Inherited from

UIElementProps.minWidth

Defined in

websg.d.ts:1395


padding

Optional padding: ArrayLike<number>

The padding of the element in pixels.

Inherited from

UIElementProps.padding

Defined in

websg.d.ts:1419


position

Optional position: ElementPositionType

The position type of the element (ex. "relative" or "absolute").

Inherited from

UIElementProps.position

Defined in

websg.d.ts:1347


Optional right: number

The distance from the right edge of the parent element.

Inherited from

UIElementProps.right

Defined in

websg.d.ts:1335


top

Optional top: number

The distance from the top edge of the parent element.

Inherited from

UIElementProps.top

Defined in

websg.d.ts:1331


value

Optional value: string

The text content of the UIText element.

Defined in

websg.d.ts:1744


width

Optional width: number

The width of the element in pixels.

Inherited from

UIElementProps.width

Defined in

websg.d.ts:1387