bs_input {bsTools}R Documentation

Create a HTML input tag configured with Bootstrap classes

Description

Create a HTML input tag configured with Bootstrap classes

Usage

bs_input(
  type = "text",
  id,
  value = NULL,
  label = NULL,
  placeholder = NULL,
  div_class = NULL,
  input_class = "form-control",
  label_class = "form-label",
  text = NULL,
  text_class = "form-text",
  input_args = list(),
  inline = FALSE
)

Arguments

type

A string, the type of input to create, passed to the type param of html5::input().

id

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

value

A string, the value of the input, passed to the value param of html5::input().

label

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

placeholder

A string, passed to the placeholder param of html5::input().

div_class

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

input_class

A string, the class of the input tag.

label_class

A string, the class of the label tag.

text

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

text_class

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

input_args

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

inline

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

Value

A string of HTML.

Examples

bs_input(
id = "example1",
label = "Example Text Input",
text = "This is an example input created with the bs_input function."
)

[Package bsTools version 0.1.0 Index]