section_block: Section Block

View source: R/layout.R

section_blockR Documentation

Section Block

Description

A section is one of the most flexible blocks available, it can be used as a simple text block, in combination with text fields, or side-by-side with any of the available block elements.

Usage

section_block(text, id = NULL, fields = NULL, accessory = NULL)

Arguments

text

character, The text for the block, in the form of a text object. Maximum length for the text in this field is 3000 characters.

id

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

fields

An array of text objects. Any text objects included with fields will be rendered in a compact format that allows for 2 columns of side-by-side text. Maximum number of items is 10., Default: NULL

accessory

One of the available element objects. Default: NULL

Details

Available in surfaces: Modals, Messages, Home tabs

Value

section_block class

See Also

Other layout: actions_block(), as.blocks(), context_block(), divider_block(), file_block(), image_block(), input_block(), wrap_blocks()

Examples

section_block(
  text = block_text(
    text = "A message *with some bold text* and _some italicized text_."
  )
)

section_block(
  text = block_text(
    text = "A message *with some bold text* and _some italicized text_."
  ),
  fields = wrap_blocks(
  block_text(text = 'High'),
  block_text(
    type = 'plain_text',
    text = 'string',
    emoji = TRUE)
  )
)

section_block(
  text = block_text(
    text = "*Sally* has requested you set the deadline for the Nano launch project"
  ),
  accessory = datepicker_element(
    id = 'datepicker123',
    initial_date = "1990-04-28", 
    placeholder = 'Select a date'
   )
  )


yonicd/slackblocks documentation built on March 2, 2023, 6:53 a.m.