bs_input | R Documentation |
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 )
id |
A string, the id/name for the input, passed to the id and name attributes of the <input> tag. |
type |
A string, the type of input to create, passed to the type attribute of the <input> tag. |
value |
A string, the value of the input, passed to the value attribute of the <input> tag. |
placeholder |
A string, passed to the placeholder attribute of the <input> tag. |
label |
A string, passed to the <label> tag. |
text |
A string, text or HTML to display with the input and label tags. |
required |
TRUE/FALSE, if TRUE, will add the required attribute to the input 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 input, label, and text. |
input_attr |
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. |
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. |
inline |
TRUE/FALSE, if TRUE, adds a div and classes to display the label, input, and text in the same line. |
A string of HTML.
bs_input( id = "example1", label = "Example Text Input" )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.