> ## Documentation Index
> Fetch the complete documentation index at: https://context7.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Code groups

> Show code examples in tabs

Place titled code fences inside `<CodeGroup>`. Use `<CodeBlock>` when code comes from an MDX component.

## Usage

````mdx theme={null}
<CodeGroup>
```js JavaScript
console.log("hello")
```

```py Python
print("hello")
```
</CodeGroup>

<CodeBlock language="ts" filename="index.ts" lines>
  {"const ready = true"}
</CodeBlock>
````

`<CodeBlock>` also accepts `icon`, `highlight`, `focus`, `wrap`, and `expandable`.

## Example

<CodeGroup>
  ```js JavaScript theme={null}
  console.log("hello")
  ```

  ```py Python theme={null}
  print("hello")
  ```
</CodeGroup>

<CodeBlock language="ts" filename="index.ts" lines>
  {"const ready = true"}
</CodeBlock>
