An Accessory
is shown in the upper right of a Section
block.
It is not used in any other block.
There can only be one Accessory
and the available types are limited to:
- Images
- Buttons, DatePickers, Pickers, CheckboxGroups
- overflow menus (not yet available as Blocks)
If the allowed accessory blocks are used within a Section
, they autowrap themselves
in an Accessory
. One might still want to use the blocks to make it explicit.
Example:
Section {
"Hello World!"
Accessory {
Image("A cute kitten", url: URL("http://placekitten.com/128/128")!)
}
}
This contains a DatePicker
Accessory
in the
Section
block:
Docs: https://api.slack.com/reference/block-kit/blocks#section