popoverInput2: popoverInput2

Description Usage Arguments Value Note Author(s) Examples

Description

Place a help icon with popover text next to a shiny input function. Both the help icon and the input element float left.

Usage

1
2
3
popoverInput2(fnType, ..., helpText, fa.icon = "fa-question-circle",
  fa.color = "#337ab7", padding.top = "0.3em", popTrigger = "hover click",
  container = shiny::div, cStyle = "clear:both;")

Arguments

fnType

function or function name (character) of desired input, e.g. textInput or 'textInput'

helpText

Text to place in popover (character). Omit to align an helpless input with a helpful input.

fa.icon

Icon name from font awesome, default is "fa-question-circle".

fa.color

Color of icon; defaults to bootstrap link color.

padding.top

Padding to align the help icon vertically with input label.

popTrigger

Trigger for popover. In c('hover','focus','click','manual').

container

HTML container to hold the input, either div or span

cStyle

Inline CSS for main container returned (character or NULL).

id

InputID for shiny element (character).

label

Input label (character).

...

Additional named arguments to input function.

Value

HTML code.

Note

Requires Eric Bailey's shinyBS package (available from CRAN).

Author(s)

Jon Katz

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
popoverInput2(
       checkboxGroupInput,
       'lyrOpts',
       'Options:',
       choices=c(
           'Paste URL'='url',
           'Clip to Layer'='clip',
           'Projection Ref'='projection',
           'No Data'='empty'
           ),
       selected=c('clip','projection'),
       inline=TRUE,
       helpText="To download a layer from a website check \"Paste URL\". You may also clip or project all rasters to match this one. If the layer contains only boundary or projection information check \"No Data\".",
       padding.top="1em"
   )

jonkatz2/shinyAddOns documentation built on May 19, 2019, 7:30 p.m.