Value boxes in Quarto

I'm trying to get Value boxes into a Quarto HTML document.

  • flexdashboard::valueBox() isn't working at all. I think it's not supposed to work in Quarto, that's ok.
  • bslib::value_box() works inline but not in Rendered output. I wonder if this should work?
---
format: html
---

```{r}
library(bslib)
library(shiny)
library(bsicons)
```

::: {layout-ncol=1}

```{r}
flexdashboard::valueBox(100, 
         icon = "fa-user")
```


```{r}
bslib::value_box(
  title = "I got",
  value = "99 problems",
  showcase = bs_icon("music-note-beamed"),
  p("bslib ain't one", bs_icon("emoji-smile")),
  p("hit me", bs_icon("suit-spade"))
)
```
:::

This works inline:

Doesn't work in HTML output:

Following the example from here: Value boxes • bslib

Thanks very much!

Upgrading to the most recent dev version (version 0.5.0.9000) of {bslib} using install.packages("rstudio/bslib") fixes this.

Solution found via links in this GitHub issue: Quarto HTML incompatible with bslib full screen cards · Issue #6081 · quarto-dev/quarto-cli · GitHub

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.