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

Tokens

PreviousForm ViewNextIcon

Last updated 3 years ago

Tokens allow customizing how the command's parameters are displayed in the input of the Command Bar.

  • paramName: The name of the parameter associated with this token. These parameters are typically added with .

  • label: Optional. The label for the token. By default, the parameter's name is used.

  • icon: Optional. The for the token.

{
  "tokens": [
    {
      "paramName": "image",
      "label": "Moon",
      "icon": "🌜"
    }
  ],
  "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"
        }
      }
    ]
  }
}
Icon
ActionMoveAddParam