input_block: Input Block

View source: R/layout.R

input_blockR Documentation

Input Block

Description

A block that collects information from users - it can hold a plain-text input element, a select menu element, a multi-select menu element, or a datepicker.

Usage

input_block(label, element, id = NULL, hint = NULL, optional = NULL)

Arguments

label

character, a label that appears above an input element.

element

An plain-text input element, a select menu element, a multi-select menu element, or a datepicker.

id

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

hint

An optional hint that appears below an input element in a lighter grey. Default: NULL

optional

A boolean that indicates whether the input element may be empty when a user submits the modal. Default: NULL

Details

Available in surfaces: Modals, Messages, Home tabs

Value

input_block class

See Also

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

Examples

input_block(
  id = 'input123',
  label = 'Label of input',
  element = plaintext_element(
    id = 'plain_input',
    placeholder = 'Enter some plain text'
  )
)

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