You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs-info.md
+30Lines changed: 30 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -204,6 +204,36 @@ becomes
204
204
npm <command><package>
205
205
```
206
206
207
+
### Bundler tabs
208
+
209
+
Bundler tabs render a compact tab row (like package-manager tabs) but accept rich markdown content per bundler (like the framework component). The user's bundler choice is persisted to `localStorage` and synced across every bundler tab block on the page.
210
+
211
+
Inside `variant="bundler"`, each top-level heading whose text matches a known bundler starts a new section, and the following nodes (prose, code blocks, etc.) become that bundler's panel. The transformer uses the largest heading level present in the block, so `# Vite` / `# Rsbuild` and `## Vite` / `## Rsbuild` both work — just be consistent within a single block.
212
+
213
+
````md
214
+
<!-- ::start:tabs variant="bundler" -->
215
+
216
+
# Vite
217
+
218
+
```ts title="vite.config.ts"
219
+
import { defineConfig } from'vite'
220
+
221
+
exportdefaultdefineConfig({})
222
+
```
223
+
224
+
# Rsbuild
225
+
226
+
```ts title="rsbuild.config.ts"
227
+
import { defineConfig } from'@rsbuild/cli'
228
+
229
+
exportdefaultdefineConfig({})
230
+
```
231
+
232
+
<!-- ::end:tabs -->
233
+
````
234
+
235
+
Supported bundlers: `vite`, `rsbuild`. Heading text is matched case-insensitively. Both sections should be defined; if the user's selected bundler isn't present in a particular block, the first defined panel is shown as a fallback.
236
+
207
237
## Framework component
208
238
209
239
Framework blocks let one markdown source contain React, Solid, or other framework-specific content. Internally, the transformer looks for h1 headings inside the framework block and treats each `# Heading` as a framework section boundary. It then stores framework metadata and rewrites the block into separate framework panels.
0 commit comments