Lindsay Jorgenson
Lindsay Jorgenson

Reputation: 1

Can I used bslib cards in my Shiny app without using a bootswatch theme?

My question is hopefully pretty simple. I would like to use cards from bslib (see here: https://rstudio.github.io/bslib/articles/cards.html) but I do not use a bootswatch theme. I use custom css for my theme.

I want to still use the cards, but I cannot figure out how to make them work without a bootswatch theme. I tried adding css for cards from a bootswatch theme into my css, but this didn't work.

Any thoughts would be appreciated.

Upvotes: 0

Views: 577

Answers (1)

Scopinho
Scopinho

Reputation: 26

You can just load the bslib library and use the cards in shiny. Below a simple example:

library(shiny)
library (bslib)

ui <- page_fluid(
  card(
    card_header("Header"), 
    card_body("Body")
  )
)      

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

Upvotes: 0

Related Questions