diff --git a/components/code-groups.mdx b/components/code-groups.mdx index c1eb4d08b..9cd3807a6 100644 --- a/components/code-groups.mdx +++ b/components/code-groups.mdx @@ -28,6 +28,36 @@ class HelloWorld { +## Language dropdown + +You can replace the tabs in a code group with a dropdown menu to toggle between languages. + + + +```javascript helloWorld.js +console.log("Hello World"); +``` + +```python hello_world.py +print('Hello World!') +``` + +```java HelloWorld.java +class HelloWorld { + public static void main(String[] args) { + System.out.println("Hello, World!"); + } +} +``` + + + +### Props + + + Whether to show a dropdown button to toggle the code groups with languages as the options. + + ````mdx Code Group Example