Learn more at https://getbootstrap.com/docs/5.1/forms/overview/.
bs_input(
id,
type = "text",
value = NULL,
placeholder = NULL,
label = NULL,
text = NULL,
required = FALSE,
div_attr = NULL,
input_attr = c(class = "form-control"),
label_attr = c(class = "form-label"),
text_attr = c(class = "form-text"),
inline = FALSE
)
A string of HTML.
A string, the id/name for the input, passed to the id and name attributes of the <input> tag.
A string, the type of input to create, passed to the type attribute of the <input> tag.
A string, the value of the input, passed to the value attribute of the <input> tag.
A string, passed to the placeholder attribute of the <input> tag.
A string, passed to the <label> tag.
A string, text or HTML to display with the input and label tags.
TRUE/FALSE, if TRUE, will add the required attribute to the input tag.
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 input, label, and text.
A named list or named vector, names are attribute names and values are attribute values. Passed to the attr parameter of html5::input, but id (also name), type, value, and placeholder have their own parameters.
A named list or named vector, names are attribute names and values are attribute values. Passed to the attr parameter of html5::label.
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.
TRUE/FALSE, if TRUE, adds a div and classes to display the label, input, and text in the same line.
bs_input(
id = "example1",
label = "Example Text Input"
)
Run the code above in your browser using DataLab