valuebox render #12631
-
DescriptionI am trying to have a dynamic value for my valuebox in quarto shiny dashboard but none of these works.. ---
title: "mytitle"
format: dashboard
server: shiny
---
```{r}
#| context: server
output$level1 <- renderUI({
124124
})
output$level2 <- renderText({
124124
})
output$level3 <- renderPrint({
124124
})
```
```{r}
#| content: valuebox
#| title: "Level 1"
list(
icon = "person",
color = "primary",
value = uiOutput("level1")
)
```
### Row {height="20%"}
```{r}
#| content: valuebox
#| title: "Level 2"
list(
icon = "person",
color = "primary",
value = textOutput("level2")
)
```
### Row {height="20%"}
```{r}
#| content: valuebox
#| title: "Level 3"
#|
list(
icon = "person",
color = "primary",
value = verbatimTextOutput("level3")
)
```
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
The value box static syntax are by definition static. In the future, please read the documentation. A quite amount of time has been spent on it, so please do explore it before asking questions. |
Beta Was this translation helpful? Give feedback.
-
thank you. |
Beta Was this translation helpful? Give feedback.
-
I missed it! that really helps. thank you again |
Beta Was this translation helpful? Give feedback.
The value box static syntax are by definition static.
Use shiny components.
In the future, please read the documentation. A quite amount of time has been spent on it, so please do explore it before asking questions.