wrapper for feedback()
function that displays a
warning message by default
feedbackWarning(inputId, condition, text = "Ye be warned",
color = "#F89406", icon = shiny::icon("warning-sign", lib = "glyphicon"))
the Shiny input's inputId
argument
condition under which feeback is displayed
default "Ye be warned"
text string to display below input
defailt "#F89406"
the color of the feeback
default icon("warning-sign", lib="glyphicon"))
a shiny::icon
object
feedback
, feedbackDanger
, feedbackSuccess
Other feedback wrappers: feedbackDanger
,
feedbackSuccess
# NOT RUN {
## Only run examples in interacive R sessions
if (interactive()) {
ui <- fluidPage(
useShinyFeedback(),
numericInput(
"exampleInput",
"Show Feedback When < 0",
value = -5
)
)
server <- function(input, output) {
observeEvent(input$exampleInput, {
feedbackWarning(
"exampleInput",
condition = input$exampleInput < 0
)
})
}
shinyApp(ui, server)
}
# }
Run the code above in your browser using DataLab