List

A dropdown. Produces a string.

This type requires an extra data attribute, which describes an array of objects used to create the dropdown content. Each object supports these properties:

name

Specifies how the option is called in the dropdown.

value

This is sent to the client app, can be any string, for example stringified JSON. LViS passes this through as is.

preview

Optional object which provides data for value preview. Has two properties:

  • type - preview type. Only "video" type is supported now.

  • url - video preview URL.

Note that if the default value is specified then it must be one of the value defined by the data attribute.

Example

{
  "key": "position",
  "type": "list",
  "data": [{
    "name": "At the top",
    "value": "top",
    "preview": {
      "type": "video",
      "url": "http://example.com/preview.mp4"
    }
  }, {
    "name": "At the bottom",
    "value": "bottom",
    "preview": {
      "type": "video",
      "url": "http://example.com/preview2.mp4"
    }
  }]
}

List may use a collection as a source of available values. See Data Sources for more details.

Last updated