if(interactive()){
library(shiny)
library(magrittr)
ui <- fluidPage(
br(), br(), br(), br(), br(), br(), column(2),
actionButton("", "Popover on the left") %>%
bsPopover("Popover on the left", "content", "left"),
actionButton("", "Popover on the top") %>%
bsPopover("Popover on the top", "content", "top"),
actionButton("", "Popover on the right") %>%
bsPopover("Popover on the right", "content", "right"),
actionButton("", "Popover on the bottom") %>%
bsPopover("Popover on the bottom", "content", "bottom"),
br(), br(), column(2),
actionButton("", "primary color") %>%
bsPopover(
"primary color", "content", bgcolor = "#0275d8",
titlecolor = "white", contentcolor = "#0275d8"),
actionButton("", "danger color") %>%
bsPopover(
"danger color", "content", bgcolor = "#d9534f",
titlecolor = "white", contentcolor = "#d9534f"),
actionButton("", "warning color") %>%
bsPopover(
"warning color", "content", bgcolor = "#f0ad4e",
titlecolor = "white", contentcolor = "#f0ad4e"),
br(), br(), column(2),
actionButton("", "9px & 14px") %>%
bsPopover("9px", "14", titlesize = "9px", contentsize = ),
actionButton("", "14px & 12px") %>%
bsPopover("14px", "12", titlesize = "14px"),
actionButton("", "20px & 9px") %>%
bsPopover("20px", "9", titlesize = "20px"),
br(), br(), column(2),
actionButton("", "weight 100 & 800") %>%
bsPopover("weight 100", "800", titleweight = "100", contentweight = "800"),
actionButton("", "weight 400 & 600") %>%
bsPopover("weight 400", "600", titleweight = "400", contentweight = "600"),
actionButton("", "weight 600 & 400") %>%
bsPopover("weight 600", "400", titleweight = "600", contentweight = "400"),
actionButton("", "weight 900 & 200") %>%
bsPopover("weight 900", "200", titleweight = "900", contentweight = "200"),
br(), br(), column(2),
actionButton("", "opacity 0.2") %>%
bsPopover("opacity 0.2", opacity = 0.2),
actionButton("", "opacity 0.5") %>%
bsPopover("opacity 0.5", opacity = 0.5),
actionButton("", "opacity 0.8") %>%
bsPopover("opacity 0.8", opacity = 0.8),
actionButton("", "opacity 1") %>%
bsPopover("opacity 1", opacity = 1),
br(), br(), column(2),
actionButton("f1", "allow html: 'abcdanger'") %>%
bsPopover(HTML("abcdanger"),
html = TRUE, bgcolor = "#0275d8"),
actionButton("f2", "allow html: 'del content'") %>%
bsPopover(HTML("del content"), html = TRUE, bgcolor = "#d9534f"),
actionButton("", "Clickable with links") %>%
bsPopover(
title = "Clickable with links",
content = "This message has a link", "bottom",
html = TRUE, click_inside = TRUE, bgcolor = "orange"
)
)
server <- function(input, output, session) {}
shinyApp(ui, server)
}
if(interactive()){
library(shiny)
library(magrittr)
ui <- fluidPage(
br(), br(), br(), br(), br(), br(), column(2),
actionButton("", "primary") %>%
bsPop("primary", "primary", status = "primary"),
actionButton("", "info") %>%
bsPop("info", "info", status = "info"),
actionButton("", "success") %>%
bsPop("success", "success", status = "success"),
actionButton("", "warning") %>%
bsPop("warning", "warning", status = "warning"),
actionButton("", "danger") %>%
bsPop("danger", "danger", status = "danger")
)
server <- function(input, output, session) {}
shinyApp(ui, server)
}
Run the code above in your browser using DataLab