From d883e80b5c225aa44a7be6db3bdaa8362ee64b9f Mon Sep 17 00:00:00 2001 From: "mintlify[bot]" <109931778+mintlify[bot]@users.noreply.github.com> Date: Wed, 22 Apr 2026 01:19:51 +0000 Subject: [PATCH] Document deep anchor support for View component Generated-By: mintlify-agent --- components/view.mdx | 16 ++++++++++++++++ guides/linking.mdx | 12 ++++++++++++ 2 files changed, 28 insertions(+) diff --git a/components/view.mdx b/components/view.mdx index 4c4969bdf..68c2e9baf 100644 --- a/components/view.mdx +++ b/components/view.mdx @@ -52,6 +52,22 @@ The table of contents automatically updates to show only the headings for the cu If you have different heading structures in each view, users only see the headings that are relevant to their selected language or framework. +## Deep anchor links + +Each `View` automatically generates an anchor ID from its title, so you can link directly to a specific view. When a user visits a URL with a view's anchor hash, that view activates automatically. + +```text +https://your-docs.com/page-with-views#python +``` + +You can also link to headings, accordions, or other anchored elements inside a view. The correct view activates and scrolls to the target element. + +```text +https://your-docs.com/page-with-views#install-the-sdk +``` + +When a user switches views using the dropdown, the URL hash updates to match the selected view, preserving any existing query parameters. This makes view selections shareable. + ## Properties diff --git a/guides/linking.mdx b/guides/linking.mdx index 3b688caef..da99859f7 100644 --- a/guides/linking.mdx +++ b/guides/linking.mdx @@ -84,6 +84,18 @@ By default, the hash derives from the accordion's `title`. Use the `id` property This accordion is reachable at `#install` instead of the auto-generated `#installation-steps`. See [Accordions](/components/accordions) for more. +### View deep links + +Pages that use the [View component](/components/view) support deep linking to a specific view or to elements inside a view. Each view generates an anchor ID from its title, so `#python` activates the view titled "Python". + +You can also link to a heading or accordion inside a view. The correct view activates and the page scrolls to the target element: + +```text +https://your-docs.com/page-with-views#install-the-sdk +``` + +When users switch views using the dropdown, the URL hash updates automatically, making view selections shareable. See [View](/components/view#deep-anchor-links) for more details. + ### API playground deep links To open the API playground in a link, append `?playground=open` to any endpoint page URL: