-
Notifications
You must be signed in to change notification settings - Fork 215
Document tab and code group synchronization #2740
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-Authored-By: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com>
Co-Authored-By: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com>
| Code groups inherit global styling from your `docs.json` file. Customize your theme using `styling.codeblocks`. See [Settings](/organize/settings#styling) for configuration options. | ||
|
|
||
| ## Creating code groups | ||
| Code groups automatically synchronize with other code groups and [tabs](/components/tabs) on the same page when their labels match. When you select a language in one code group, all tabs and code groups with matching labels update to show the same language. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be worth keeping this as its own section heading for scanability. Also, if language selection still persists across reloads (mentioned in the PR description), calling that out here helps set expectations.
| Code groups automatically synchronize with other code groups and [tabs](/components/tabs) on the same page when their labels match. When you select a language in one code group, all tabs and code groups with matching labels update to show the same language. | |
| ## Synchronized selections | |
| Code groups automatically synchronize with other code groups and [tabs](/components/tabs) on the same page when their labels match. When you select a language in one code group, all tabs and code groups with matching labels update to show the same language. | |
| Your language selection persists across page reloads. |
| </Tabs> | ||
| ```` | ||
| Tabs automatically synchronize with other tabs and [code groups](/components/code-groups) on the same page when their labels match. When you select a tab, all other tabs and code groups with the same label update to match your selection. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor clarity tweak: since this is driven by tab labels, consider explicitly tying "labels" to Tab title values.
| Tabs automatically synchronize with other tabs and [code groups](/components/code-groups) on the same page when their labels match. When you select a tab, all other tabs and code groups with the same label update to match your selection. | |
| Tabs automatically synchronize with other tabs and [code groups](/components/code-groups) on the same page when their labels match (the `title` values). When you select a tab, all other tabs and code groups with the same label update to match your selection. |
Added documentation for the automatic synchronization feature between tabs and code groups when their labels match. Also documented the new
borderBottomproperty for the Tabs component.Files changed:
components/tabs.mdx- Added synchronization section, updated property descriptions, and documentedborderBottompropertycomponents/code-groups.mdx- Added synchronization section explaining cross-component syncing and language persistenceGenerated from feat: add optional bottom border to Tabs component @rtbarnes
Note
Documents new cross-component selection syncing and updates Tabs props.
TabsandCodeGroupnow coordinate selections across components with matching labelscomponents/tabs.mdx: clarifiestitlebehavior (matching titles synchronize), and documents newborderBottomboolean propcomponents/code-groups.mdx: adds syncing section and adjusts heading to## Create code groupsWritten by Cursor Bugbot for commit 1756609. This will update automatically on new commits. Configure here.