Basic Example

{
  "type": "heading",
  "level": 1,
  "text": "Sample headingblock content",
  "margin": "sample-margin",
  "textAlign": "left"
}

Live Example

Example Code
[
  {
    "type": "heading",
    "level": 2,
    "text": "Course Overview",
    "margin": "medium"
  },
  {
    "type": "text",
    "text": "This comprehensive course will guide you through the fundamentals of web development.",
    "as": "p"
  }
]

Properties

type
string
required
Identifies this as a heading blockMust be heading
level
integer
required
The heading level (1-6)Allowed values: 1, 2, 3, 4, 5, 6
text
string
required
The text content of the heading
margin
string
required
Optional margin setting for the heading
textAlign
string
required
Text alignment for the headingAllowed values: left, center, right

Usage Notes

  • This element is part of the BlockKit system for building dynamic user interfaces
  • All properties marked as (required) must be included in your JSON structure
  • Optional properties can be omitted and will use their default values when applicable