bs_textarea {bsTools}R Documentation

Create a HTML textarea tag configured with Bootstrap classes

Description

Learn more at https://getbootstrap.com/docs/5.1/forms/overview/.

Usage

bs_textarea(
  id,
  value = NULL,
  label = NULL,
  placeholder = NULL,
  text = NULL,
  inline = FALSE,
  required = FALSE,
  div_attr = NULL,
  textarea_attr = c(class = "form-control"),
  label_attr = c(class = "form-label"),
  text_attr = c(class = "form-text")
)

Arguments

id

A string, the id/name for the textarea, passed to the id and name attributes of the <textarea> tag.

value

A string, the value of the textarea, passed to the value attribute of the <textarea> tag.

label

A string, the label to use for the textarea, passed to html5::label.

placeholder

A string, passed to the placeholder attribute of the <textarea> tag.

text

A string, text or HTML to display with the textarea and label tags.

inline

TRUE/FALSE, if TRUE, adds a div and classes to display the label and textarea and text in the same line.

required

TRUE/FALSE, if TRUE, will add the required attribute to the textarea tag.

div_attr

A named list or named vector, names are attribute names and values are attribute values. Passed to the attr parameter of html5::div, wrapping the textarea, label, and text.

textarea_attr

A named list or named vector, names are attribute names and values are attribute values. Passed to the attr parameter of html5::textarea.

label_attr

A named list or named vector, names are attribute names and values are attribute values. Passed to the attr parameter of html5::label.

text_attr

A named list or named vector, names are attribute names and values are attribute values. Passed to the attr parameter of html5::div, which will display the text parameter.

Value

A string of HTML.

Examples

bs_textarea(
id = "example1",
label = "Example Text Area Input"
)

[Package bsTools version 1.0.5 Index]