Description Usage Arguments Value Note Author(s) Examples
Place a help icon with popover text next to a shiny input function using an actionLink
1 2 3 | popoverInput(fnType, id, label, ..., helpText, divStyle = NULL,
helpStyle = "padding-top:1.5em;text-align:center;", popTrigger = "hover",
colWidths = c(2, 10))
|
fnType |
function or function name (character) of desired input, e.g. textInput or 'textInput' |
id |
InputID for shiny element (character). |
label |
Input label (character). |
helpText |
Text to place in popover (character). |
divStyle |
Inline CSS for main div returned (character or NULL). |
helpStyle |
Inline CSS for the help icon (e.g. padding to align it vertically with input; character or NULL). |
popTrigger |
Trigger for popover. In c('hover','focus','click','manual'). |
colWidths |
Length 2 numeric vector specifying width of help button column and width of input function column. Should sum to 12. |
... |
Additional named arguments to input function. |
HTML code.
Requires Eric Bailey's shinyBS package (available from CRAN).
Jon Katz
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | popoverInput(
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\".",
divStyle='padding-top:1em;padding-bottom:1em;',
helpStyle='padding-top:0.5em;'
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.