quarto

How to add multiple rows in a tabset within a Quarto dashboard?


Consider this layout example for a Quarto dashboard containing tabsets, taken straight from the docs:

---
title: "Palmer Penguins"
format: dashboard
---
    
## Row {.tabset}

### Plots

```{python}
```

```{python}
```

### Data

```{python}
```

The python cells in the Plots tab will be placed next to each other, i.e. there are two columns in this particular tab.

How can I change this layout to have two rows instead?


Solution

  • You can wrap the cells inside a .rows div:

    ---
    title: "Palmer Penguins"
    format: dashboard
    ---
        
    ## Row {.tabset}
    
    ### Plots
    
    ::: {.rows}
    ```{python}
    "Row 1"
    ```
    
    ```{python}
    "Row 2"
    ```
    :::
    
    ### Data
    
    ```{python}
    ```
    

    enter image description here