In Quarto we have the scrolling
option for Dashboards which can be really usefull. But this will be applied to all pages on your dashboard. I would like to have this only on some pages. Here I created a simple reproducible example:
---
title: "Scrolling"
format:
dashboard:
scrolling: true
---
# Page 1
```{r}
head(mtcars)
```
```{r}
plot(mtcars$mpg, mtcars$cyl)
```
# Page 2
```{r}
plot(mtcars$carb, mtcars$vs)
```
On Page 1 the scrolling option is really useful since we have multiple items, but on Page 2 I don't want a scrolling option because not necessary (this is really simple example). So I was wondering how we can use the scrolling option on only some pages in Quarto Dashboards?
You can set the scrolling property at the page level using the Pandoc fenced div notation. For example:
---
title: "Scrolling"
format:
dashboard:
scrolling: false
---
# Page 1 {scrolling="true"}
```{r}
head(mtcars)
```
```{r}
plot(mtcars$mpg, mtcars$cyl)
```
# Page 2
```{r}
plot(mtcars$carb, mtcars$vs)
```
Page 1 (scrollable):
Page 2 (fitted to page):