plaintext_element: Plain-text input element

View source: R/elements.R

plaintext_elementR Documentation

Plain-text input element

Description

A plain-text input, similar to the HTML input tag, creates a field where a user can enter freeform data. It can appear as a single-line field or a larger textarea using the multiline flag.

Usage

plaintext_element(
  id,
  placeholder,
  initial_value = NULL,
  multiline = NULL,
  min_length = NULL,
  max_length = NULL
)

Arguments

id

character, an identifier for the input value when the parent modal is submitted.

placeholder

character, A text object that defines the placeholder text shown in the plain-text input.

initial_value

character, the initial value in the plain-text input when it is loaded. Default: NULL

multiline

logical, indicates whether the input will be a single line (FALSE) or a larger textarea (TRUE). Default: NULL

min_length

integer, the minimum length of input that the user must provide. If the user provides less, they will receive an error. Default: NULL

max_length

integer, The maximum length of input that the user can provide. If the user provides more, they will receive an error in the response. Default: NULL

Details

Works with block types: Section, Actions, Input

Value

block element object

See Also

Other elements: button_element(), checkbox_element(), datepicker_element(), image_element(), overflow_menu(), radiobuttons_element(), select_menu(), select_type_menu()

Examples

plaintext_element(
  id = 'plain_input',
  placeholder = 'Enter some plain text'
)

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