Number

Displays a number, allowing control over font sizes, weight, and color and format.

Interface

interface INumber extends IElement {
  number: number;
  digits?: number;
  weight?: TextWeight;
  size?: TextSize;
  wrap?: boolean;
  maxLines?: number;
  title?: string;
}

Example

Number
{
  "type": "Number",
  "number": 234056,
  "digits":2
}

Properties

type

Must be “Number”.

  • Type: "Number"

  • Required: Yes

number

Number to display.

  • Type: number

  • Required: Yes

digits

Indicates the number of digits displayed after the decimal point.

  • Type: number

  • Required: No

weight

Controls text weight.

size

Controls text size

wrap

If true, allow text to wrap. Otherwise, text is clipped.

  • Type: boolean

  • Required: No

  • Default value: false

maxLines

Specifies the maximum number of lines to display.

  • Type: number

  • Required: No

title

Specifies extra information about an element.

  • Type: string

  • Required: No