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
You then want to give your `CodeSwitcher` components the `name` prop to match them
73
+
with the configured language group. If you omit the `name` prop, it uses the group
74
+
named `default`.
75
+
76
+
````markdown
77
+
<!-- Uses the "default" languages defined above -->
78
+
<CodeSwitcher>
79
+
<template v-slot:js>
80
+
<!-- ... (see above) -->
81
+
</template>
82
+
<template v-slot:ts>
83
+
<!-- ... (see above) -->
84
+
</template>
85
+
</CodeSwitcher>
86
+
87
+
<!-- Uses the "jvm" languages defined above -->
88
+
<CodeSwitcher name="jvm">
89
+
<template v-slot:java>
90
+
<!-- ... (see above) -->
91
+
</template>
92
+
<template v-slot:kotlin>
93
+
<!-- ... (see above) -->
94
+
</template>
95
+
<template v-slot:jruby>
96
+
<!-- ... (see above) -->
97
+
</template>
98
+
</CodeSwitcher>
99
+
````
100
+
49
101
#### Props
50
102
| Prop | Description | Type | Default |
51
103
| ----- | ----- | ---- | ---- |
52
104
| languages | The languages that can be switched between. The object expects shorthands as keys and the tab title as values. The shorthands will also be used as slot names | Object | --- |
53
-
| name | All code switchers on one page with the same name will be synchronized | String |`'default'`|
105
+
| name | All code switchers on one page with the same name will be synchronized. When using the `groups` plugin option, this will also determine the default value for the `languages` prop.| String |`'default'`|
54
106
| isolated | if true, this block will not synchronize with any others or load/save its state to/from localstorage | Boolean |`false`|
0 commit comments