Slapdash Platform
GitHub
  • Ahoy, world!
  • Command Bar 101
    • How it Works
    • Core Terminology
    • Commands
    • Local Commands
    • Cloud Commands
    • Build Your First Command
    • Publish Command
    • Hooks
  • Command Tutorials
    • Toggle Dark Mode
    • Emoji Paster
    • Copy Special Character
    • Send Slack Message
  • Reference
    • Command Response
    • Action
    • View
    • List View
    • Masonry View
    • Form View
    • Tokens
    • Icon
    • Config
Powered by GitBook
On this page
  1. Reference

Masonry View

PreviousList ViewNextForm View

Last updated 3 years ago

The Masonry View response tells the Command Bar to displays options in the Pinterest-like layout.

  • type: "masonry"

  • options: An array of objects.

{
  "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

For MasonryView, property CommandResponse.view.options contains the list of MasonryOption objects.

  • imageURL: The image URL for this option.

{
  "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"
        }
      }
    ]
  }
}

action: Option's object.

moveAction: Optional. Option's object.

MasonryOption
Main Action
Move Action