Displays message context, which can include both images and text.

context_block(elements, id = NULL)

Arguments

elements

An array of image elements and text objects. Maximum number of items is 10.

id

character, A string acting as a unique identifier for a block. Default: NULL

Value

context_block class

Details

Available in surfaces: Modals, Messages, Home tabs

See also

Examples

context_block( elements = wrap_blocks( image_element( url = 'https://image.freepik.com/free-photo/red-drawing-pin_1156-445.jpg', alt_text = 'images' ), block_text( text = 'Location: **Dogpatch**' ) ) )
#> { #> "type": "context", #> "elements": [ #> { #> "type": "image", #> "image_url": "https://image.freepik.com/free-photo/red-drawing-pin_1156-445.jpg", #> "alt_text": "images" #> }, #> { #> "type": "mrkdwn", #> "text": "Location: **Dogpatch**" #> } #> ] #> }