quarto

How to remove the expand button from a tabset card in a Quarto dashboard?


How do I remove the expandable option from a card that has tabsets?

---
title: "Untitled"
format: dashboard
---

## Quarto {.tabset}
### Tab1 {.expandable = "false"}

```{r}
plot(mtcars)
```

### tab2 {.expandable = "false"}

```{r}
plot(mtcars)
```

I want to keep the expandable button that is generated with the code graphic (the inner expand button), but remove the one that is associated with the card that has tabs.

how the expandable button render


Solution

  • You can add the css

    .tabset.card:has(.card) > * > .bslib-full-screen-enter {
      display: none;
    }
    

    enter image description here

    ---
    title: "Untitled"
    format: dashboard
    ---
    
    ```{css}
    .tabset.card:has(.card) > * > .bslib-full-screen-enter {
      display: none;
    }
    ```
    
    ## Quarto {.tabset expandable=false}
    
    ### Tab1 {}
    
    ```{r}
    plot(mtcars)
    ```
    
    ### tab2 {}
    
    ```{r}
    plot(mtcars)
    ```
    

    Another possibility to include the css is

    ---
    title: "Untitled"
    format: dashboard
    include-before-body:
      text: |
        <style>
          .tabset.card:has(.card) > * > .bslib-full-screen-enter {
            display: none;
          }
        </style>
    ---