簡體   English   中英

使用 Bootstrap 4 替代 shinyBS::popify

[英]Alternative to shinyBS::popify with Bootstrap 4

bslib package 的幫助下,我在我的 Shiny 應用程序中使用了 Bootstrap 4。 然后用shinyBS::popify制作的彈出框不起作用。 是否有替代方案或使它們起作用的方法?

library(shiny)
library(shinyBS)
library(bslib)

ui <- fluidPage(
  theme = bs_theme(version = 4, bootswatch = "united"),
  popify(
    bsButton("pointlessButton", "Button", style = "primary", size = "large"),
    "A Pointless Button",
    "This button is <b>pointless</b>. It does not do <em>anything</em>!"
  )
)

server <- function(input, output, session) {}

shinyApp(ui, server)

您可以嘗試spsComps ,它適用於 BS4

library(shiny)
library(shinyBS)
library(bslib)
library(spsComps)
ui <- fluidPage(
    theme = bs_theme(version = 4, bootswatch = "united"),
    bsHoverPopover(
        bsButton("pointlessButton", "Button", style = "primary", size = "large"),
        "A Pointless Button",
        "This button is <b>pointless</b>. It does not do <em>anything</em>!",
        "bottom", html = T
    )
)

server <- function(input, output, session) {}

shinyApp(ui, server)

在此處輸入圖像描述

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM