The element embedded into the Shiny input will be pulled to the right edge of the label.

shinyInput_label_embed(tag, element)

Arguments

tag

Shiny input, such as shiny::[numericInput][shiny::numericInput]

element

htmltools::[tag][htmltools::tag] to be embedded into label of tag

Value

Shiny input, modified copy of tag

Details

To promote consistency, the following convention is proposed:

For links (activated by clicking), embed a shiny::icon("info-circle"); this is the default for shiny_iconlink(). For elements activated by hovering, embed a shiny::icon("info").

See also

Examples

library("shiny") numericInput(inputId = "foo", label = "Enter a number", value = 0) %>% shinyInput_label_embed( shiny_iconlink() %>% bs_embed_popover(title = "Number", content = "Not a complex number") )
#> <div class="form-group shiny-input-container"> #> <label class="control-label" id="foo-label" for="foo" style="width:100%;"> #> Enter a number #> <div class="pull-right"> #> <a href="#" title="Number" data-toggle="popover" data-content="Not a complex number" data-placement="top"> #> <i class="fa fa-info-circle" role="presentation" aria-label="info-circle icon"></i> #> </a> #> </div> #> </label> #> <input id="foo" type="number" class="form-control" value="0"/> #> </div>