Lightning Types Reference
This section describes the keywords available and the default editor and renderer associated with each of the Lightning types.
The lightning__booleanType Lightning type corresponds to the boolean type in a JSON schema. It produces only two values, true or false.
lightning__booleanType | |
---|---|
Editor Description | When the type receives user input, it appears as a toggle in the UI. Default editor example: ![]() |
Renderer Description | When the type produces output, it’s rendered as a true or false value.Default Renderer example: ![]() |
For information about boolean type, see Understanding JSON Schema: boolean.
The lightning__dateType Lightning type uses a string type to specify the date data in the format yyyy-mm-dd
.
lightning__dateType | |
---|---|
Editor Description | When the type receives user input, it appears as a date picker in the UI. Default editor example: ![]() |
Renderer Description | When the type produces output, it’s rendered as a date data.Default Renderer example: ![]() |
The lightning__dateTimeType Lightning type describes the complex Lightning type lightning__objectType, which contains the dateTime
and timeZone
(optional) properties. Use the Lightning__dateTimeType Lightning type to specify date and time together.
Because lightning__dateTimeType is a standard complex Lightning type, the value of the type is represented as an object.
This table shows the properties of the object type that the lightning_dataTimeType Lightning type describes.
Property | Required or Optional | Type | Description |
---|---|---|---|
dateTime | Required | String | Specify the date value in yyyy-MM-dd'T'HH:mm:ss.SSSZ format. |
timeZone | Optional | String | Specify the time zone information in IANA time zone database format. |
This example shows an object with valid date and time values.
lightning__dateTimeType | |
---|---|
Editor Description | When the type receives user input, it appears as a date picker and a time picker in the UI. Default editor example: ![]() |
Renderer Description | When the type produces output, it’s rendered as a date and time data.Default Renderer example: ![]() |
Use the lightning__integerType Lightning type to specify integers. The type applies to whole numbers. The lightning__integerType Lightning type corresponds to the integer type in a JSON schema.
lightning__intergerType | |
---|---|
Editor Description | When the type receives user input, it appears as a numeric input field in the UI. Default editor example: ![]() |
Renderer Description | When the type produces output, it’s rendered as a number display field. Default Renderer example: ![]() |
For information about the integer type in JSON Schema, see Understanding JSON Schema: integer.
The lightning__multilineTextType Lightning type is similar to Lightning__textType, but it accommodates a larger maximum character length and an editor for larger text input. The lightning__multilineTextType Lightning type corresponds to the string type in a JSON schema.
lightning__multilineTextType | |
---|---|
Editor Description | When the type receives user input, it appears as a multiline text input field on the UI. Default editor example: ![]() |
Renderer Description | When the type produces output, it’s rendered as a multiline text display field. |
For information about string types in JSON Schema, see Understanding JSON Schema: string.
Use the lightning__numberType Lightning type to specify numbers. This type is validated as a decimal number, also known as a float in some programming languages. The lightning__numberType Lightning type corresponds to the number type in a JSON schema.
lightning__numberType | |
---|---|
Editor Description | When the type receives user input, it appears as a decimal number input field in the UI. Default editor example: ![]() |
Renderer Description | When the type produces output, it’s rendered as a decimal number display field. Default Renderer example: ![]() |
For information about number type in JSON Schema, see Understanding JSON Schema: number.
Use the lightning__objectType lightning type to create object lightning types. This complex Lightning type can contain sub-properties, each with its own Lightning type.
With lightning__objectType, you can group other lightning types. The lightning__objectType lightning type corresponds to the object type defined in a JSON schema.
For information about object types in JSON Schema, see Understanding JSON Schema: object.
Use the lightning__richTextType Lightning type to add, edit, and delete rich text data. You can enter input text data of up to 100,000 characters.
lightning__richTextType | |
---|---|
Editor Description | When the type receives user input, it appears as a rich text input field in the UI. Default editor example: ![]() |
Renderer Description | When the type produces output, it’s rendered as a rich text display field. |
For information about rich text editor, see Rich Text Editor.
Use the lightning__textType Lightning type for text fields, such as titles and descriptions. You can enter input text data of up to 255 characters. The lightning__textType Lightning type corresponds to the string type in a JSON schema.
lightning__textType | |
---|---|
Editor Description | When the type receives user input, it appears as a text input field on the UI. Default editor example: ![]() |
Renderer Description | When the type produces output, it’s rendered as a text display field. Default Renderer example: ![]() |
Use the lightning__urlType Lightning type for URL values. To specify the url schemes that the type can validate against, configure lightning:allowedUrlSchemes
parameter of the Lightning type.
lightning__urlType | |
---|---|
Editor Description | When the type receives user input, it appears as a URL input field in the UI. Default editor example: ![]() |
Renderer Description | When the type produces output, it’s rendered as a hyperlink. |