if (interactive()) {
library(shiny)
ui <- fluidPage(
use_prompt(),
add_prompt(
tableOutput("table"),
position = "bottom", type = "warning",
message = "this is a table", permanent = FALSE,
rounded = TRUE, animate = FALSE
)
# also works with magrittr's pipe
# tableOutput("table") %>%
# add_prompt(
# position = "bottom", type = "warning",
# message = "this is a button", permanent = FALSE,
# rounded = TRUE, animate = FALSE
# )
)
server <- function(input, output, session) {
output$table <- renderTable(head(mtcars))
}
shinyApp(ui, server)
}
Run the code above in your browser using DataLab