Skip to content

Compatibility with Bootstrap 5 #103

Description

@mubashirqasim

Great package. I am developing with Bootstrap 5. Some of the functions are not available with bootstrap 5. I wonder if there is any way to update the package compatibility with Bootstrap 5.

library(shiny)
library(bsplus)

ui <- fluidPage(
  
  theme = bs_theme(bootswatch = "sandstone", version = 5),
  
  # activate tooltips, popovers, and MathJax
  use_bs_tooltip(),
  use_bs_popover(),
  
  # Application title
  titlePanel("Tooltips, Popovers, and Modals"),
  
  # Sidebar with a slider input for number of bins
  sidebarLayout(
    sidebarPanel(
      numericInput("number", label = "Label with tooltip help", value = 0) %>%
        shinyInput_label_embed( icon("info") %>% bs_embed_tooltip(title = "Not a complex number")),
      
      selectInput("letter", label = "Label with popover help", choices = c("a", "b", "c")) %>%
        shinyInput_label_embed(shiny_iconlink() %>% bs_embed_popover(
          title = "Letter", content = "Choose a favorite", placement = "left")),
      
      bs_modal("modal_equation", title = "Equations", 
               body = includeMarkdown(system.file("markdown", "modal.md", package = "bsplus")),
               size = "medium"),
      
      selectInput(inputId = "equation", label = "Label with modal help", 
                  choices = c("F = ma", "E = mc^2")) %>%
        shinyInput_label_embed( shiny_iconlink() %>% bs_attach_modal(id_modal = "modal_equation"))
    ),
    mainPanel(
      textOutput("number"),
      textOutput("letter"),
      textOutput("equation")
    )
  )
)

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

# Run the application
shinyApp(ui = ui, server = server)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions