Skip to content

feat: adds tabbed code blocks for docs - #517

Open
zubricks wants to merge 2 commits into
mainfrom
feat/tabbed-code-blocks
Open

feat: adds tabbed code blocks for docs#517
zubricks wants to merge 2 commits into
mainfrom
feat/tabbed-code-blocks

Conversation

@zubricks

Copy link
Copy Markdown
Member
  • adds a new block for docs / richtext in the case where we need to surface nextjs code snippets / tanstack
  • tab preference applies to multiple instances of tabbed code blocks on a topic and persisted with localStorage
  • adds copy to clipboard feature

I explored extending the existing code block, but given docs authors will need to restructure the MDX either way (as a single code fence does not contain the additional tab labels and alternative snippets) making Code optionally tabbed would not eliminate that work—it would only move the complexity into a widely used block and its converter.

Screen.Recording.2026-08-25.at.1.24.49.PM.mov

- switches every CodeTabs block containing that exact label
- persists across navigation and browser reloads using localStorage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant