Skip to content

Latest commit

 

History

History
45 lines (36 loc) · 1.04 KB

File metadata and controls

45 lines (36 loc) · 1.04 KB

`Context` Blocks

Displays images and text in a horizontal stack, in a smaller font.

Show some contextual information, visually distinct to the main message content.

Example:

Context {
  Image("Pin", url: URL(
        "https://image.freepik.com/free-photo/red-drawing-pin_1156-445.jpg")!)
  Text("Location: ") + Text("Dogpatch").bold()
}

Block Types

Blocks API Representation

{
  "type": "context",
  "elements": [
    { "type" : "mrkdwn",
      "text" : "*This* is :smile: markdown"
    },
    { "type"      : "image",
      "alt_text"  : "cute cat"
      "image_url" : "https://pbs.twimg.com/profile_images/625633822235693056/lNGUneLX_400x400.jpg"
    },
    { "type": "plain_text",
      "text": "Author: K A Applegate",
      "emoji": true
    }
  ]
}