facebook / facebook/docusaurus

Page should scroll to selected tab

Open
#9,806 3 comments 0 reactions 0 assignees View on GitHub
feature
Dominant language
TypeScript
Stars
66.2k
Forks
10k
Avg merge
1d 3h
Merged PRs (30d)
52

Description

### Have you read the Contributing Guidelines on issues?

- [X] I have read the [Contributing Guidelines on issues](https://github.com/facebook/docusaurus/blob/main/CONTRIBUTING.md#issues).

### Description

Adding a query to a tab allows the user to add a selected tab to the URL, as explained here: https://docusaurus.io/docs/markdown-features/tabs#query-string

But, clicking that URL does not scroll down the page to the selected tab. This means the user must select the anchor for the containing header, to add that header to the URL, then select a tab, to add the selected tab to the URL, then the link does scroll. It's not intuitive to expect users to do this.

### Has this been requested on Canny?

_No response_

### Motivation

Improve UX around how users expect to link to a selected tab.

### API design

_No response_

### Have you tried building it?

_No response_

### Self-service

- [ ] I'd be willing to contribute this feature to Docusaurus myself.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.