Tokens
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 ActionMoveAddParam.
  • label: Optional. The label for the token. By default, the parameter's name is used.
  • icon: Optional. The Icon for the token.
Masonry View: custom label and icon for a token
1
{
2
"tokens": [
3
{
4
"paramName": "image",
5
"label": "Moon",
6
"icon": "🌜"
7
}
8
],
9
"view": {
10
"type": "masonry",
11
"options": [
12
{
13
"imageURL": "https://images.unsplash.com/photo-1481819613568-3701cbc70156",
14
"action": {
15
"type": "open-url",
16
"url": "https://images.unsplash.com/photo-1481819613568-3701cbc70156"
17
},
18
"moveAction": {
19
"type": "add-param",
20
"name": "image",
21
"value": "moon"
22
}
23
}
24
]
25
}
26
}
Copied!
Last modified 1mo ago
Copy link