Код: Выделить всё
---
title: "Value Box Alignment Example"
format:
dashboard:
expandable: false
server: shiny
---
```{r}
#| label: load-packages
#| context: setup
#| message: false
library(shiny)
library(bslib)
```
## Sidebar {.sidebar}
## Main body
### Value boxes {height="20%"}
```{r}
value_box(
title = "Cases",
value = textOutput("cases_val"),
theme = "teal"
)
```
```{r}
value_box(
title = "Some very long text dajsndasndonasddsadasd",
value = textOutput("deaths_val"),
theme = "teal"
)
```
```{r}
value_box(
title = "Recovered",
value = textOutput("recovered_val"),
theme = "teal"
)
```
```{r}
value_box(
title = "Vaccinated",
value = textOutput("vax_val"),
theme = "teal"
)
```
```{r}
value_box(
title = "Tests",
value = textOutput("tests_val"),
theme = "teal"
)
```
### Row {height="80%"}
```{r}
#| context: server
output$cases_val
Подробнее здесь: [url]https://stackoverflow.com/questions/79569729/how-to-vertically-align-values-across-bslibvalue-box-elements-in-a-quarto[/url]