Learn R Programming

bsTools (version 0.1.0)

bs_select: Create a HTML select tag configured with Bootstrap classes

Description

Create a HTML select tag configured with Bootstrap classes

Usage

bs_select(
  ...,
  id,
  label = NULL,
  div_class = NULL,
  select_class = "form-select",
  label_class = "form-label",
  text = NULL,
  text_class = "form-text",
  multiple = FALSE,
  select_args = list()
)

Arguments

...

A string or strings of HTML to pass to html5::select(), most likely a sequence of option tags.

id

A string, the id/name for the select, passed to the id and name params of html5::select().

label

A string, the label to use for the select, passed to html5::label().

div_class

A string, the class of the div tag surrounding the the label and select tags.

select_class

A string, the class of the select tag.

label_class

A string, the class of the label tag.

text

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

text_class

A string, the class of the text or HTML to display with the select and label tags.

multiple

TRUE/FALSE, if TRUE, adds the "multiple" attribute to the select tag.

select_args

A named list, names should correspond to a parameter of the html5::select() function and values will be passed to that parameter.

Value

A string of HTML.

Examples

Run this code
# NOT RUN {
bs_select(
option(value = 1, "Option One"),
option(value = 2, "Option Two"),
id = "example1",
label = "Example Select Input"
)
# }

Run the code above in your browser using DataLab