quarto-dev / quarto-dev/quarto-cli

Allow grouped tabsets to have different tab values

Open
#13,340 2 comments 0 reactions 1 assignee View on GitHub

@cscheid is already working on this.

Since Sep 7, 2025.

enhancement needs-design tabsets
Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Description

Currently, for grouped tabsets to work properly, the tab names need to have the exact same content.

https://github.com/quarto-dev/quarto-cli/blob/10af0a2ddcd4134a2d2bc9b3f7a20233e0f81ba3/src/resources/formats/html/tabsets/tabsets.js#L62

It would be helpful if grouped tabsets could look at an extra attribute, e.g. data-value, that determines how tabsets are linked.

For example, you might have R and Python tabs but want to vary the text in the tab:

::: {.panel-tabset group="lang"}
### Setup in R

```r
install.packages("quarto")
```

### Setup in Python

```bash
uv pip install quarto
```
:::

::: {.panel-tabset group="lang"}
### Print in R

```r
"hello, world"
```

### Print in Python

```python
print("hello, world")
```
:::

Currently, clicking any of the tabs in one tabset panel will "break" the display in another tabset. But they could be linked via data-value, e.g.

::: {.panel-tabset group="lang"}
### Setup in R {value="r"}

```r
install.packages("quarto")
```

### Setup in Python {value="py"}

```bash
uv pip install quarto
```
:::

::: {.panel-tabset group="lang"}
### Print in R {value="r"}

```r
"hello, world"
```

### Print in Python {value="py"}

```python
print("hello, world")
```
:::

(Assuming value="py" translates to data-value="py" in the DOM.)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.