# NOT RUN {
# javascript code
tt <- tooltip("elementId", "This is a tooltip.")
str(tt)
# example app
# }
# NOT RUN {
shinyApp(
ui = fluidPage(
jscolorInput(inputId = "col", label = "JSColor Picker",
value = "21BF6B", position = "right",
mode = "HVS", close = TRUE),
tooltip("col", "This is a JScolor widget"),
checkboxInput("cbox", "Checkbox", FALSE),
tooltip("cbox", "This is a checkbox"),
checkboxGroupInput("cboxg", "Checkbox group", selected = "a",
choices = c("a" = "a",
"b" = "b",
"c" = "c")),
tooltip("cboxg", "This is a <b>checkbox group</b>", html = TRUE),
selectInput("select", "Selectinput", selected = "a", choices = c("a"="a", "b"="b")),
tooltip("select", "This is a text input field", attr = "for", placement = "right"),
passwordInput("pwIn", "Passwordinput"),
tooltip("pwIn", "This is a password input field"),
plotOutput("plot")
),
server = function(input, output) {
output$plot <- renderPlot({
plot(cars, col = input$col, cex = 2, pch = 16)
})
})
# }
Run the code above in your browser using DataLab