Skip to content
Discussion options

You must be logged in to vote

Here is an example using only the documentations I've linked in my previous comments (especially https://quarto.org/docs/dashboards/data-display.html#shiny in the "value boxes" section)

---
format: dashboard
server: shiny
---

```{r}
#| context: setup
library(shiny)
library(bslib)
library(bsicons)
```

```{r}
#| context: server
ss <- reactive(input[["sampleSize"]])

output$ss <- renderText({
  ss()
})
```

# {.sidebar}

```{r}
sliderInput(
  "sampleSize",
  "Sample Size",
  min = 1,
  max = 10,
  value = 5,
  step = 1,
  round = 0
)
```

# Plot

```{r}
value_box(
  title = "The current sample size",
  value = textOutput("ss"),
  showcase = bs_icon("clock"),
  theme = "purple"
)
```

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@saleylabo
Comment options

@mcanouil
Comment options

mcanouil Mar 5, 2025
Collaborator

@mcanouil
Comment options

mcanouil Mar 5, 2025
Collaborator

@mcanouil
Comment options

mcanouil Mar 5, 2025
Collaborator

Answer selected by saleylabo
@saleylabo
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
dashboards shiny Related to shiny integration for interactive document
2 participants