Masonry view

Use a Masonry view to display a grid of items with images to the user when they run a command.

Parameters

Copy
Copied
{
  "view": {
    "type": "masonry",
    "options": [
      {
        "imageURL": "https://images.unsplash.com/photo-1481819613568-3701cbc70156",
        "action": {
          "type": "copy",
          "value": "Moon"
        }
      },
      {
        "imageURL": "https://images.unsplash.com/photo-1614642264762-d0a3b8bf3700",
        "action": {
          "type": "copy",
          "value": "Sun"
        }
      }
    ]
  }
}

MasonryOption objects

The MasonryOption object defines each option displayed in a Masonry view.

Parameters

  • imageURL : The image URL for this option.
  • action : Add an Action when the user presses enter or clicks on the option.
  • moveAction : Optional. Add an Action when the user presses tab on the option.
Copy
Copied
{
  "view": {
    "type": "masonry",
    "options": [
      {
        "imageURL": "https://images.unsplash.com/photo-1481819613568-3701cbc70156",
        "action": {
          "type": "open-url",
          "url": "https://images.unsplash.com/photo-1481819613568-3701cbc70156"
        },
        "moveAction": {
          "type": "add-param",
          "name": "image",
          "value": "moon"
        }
      },
      {
        "imageURL": "https://images.unsplash.com/photo-1512361180836-1ecddb33f2dd",
        "action": {
          "type": "copy",
          "value": "Sky"
        }
      }
    ]
  }
}