---
title: "Code Group"
canonical_url: "https://nnsvn.me/products/nuxt-starter-kit/components/docs/code-group"
---

> Index of every page on this site: [llms.txt](https://nnsvn.me/llms.txt)

## Usage

<ct-stack>
<div className="p-4">
<ct-code-group>

```vue [app.vue]
<template>
  <div>
    <NuxtLayout>
      <NuxtPage />
    </NuxtLayout>
  </div>
</template>
```

```vue [pages/index.vue]
<template>
  <div>
    <h1>Welcome to the homepage</h1>
    <AppAlert>
      This is an auto-imported component
    </AppAlert>
  </div>
</template>
```

</ct-code-group>
</div>

```mdc
::ct-code-group
  ```vue [app.vue]
  <template>
    <div>
      <NuxtLayout>
        <NuxtPage />
      </NuxtLayout>
    </div>
  </template>
  ```

  ```vue [pages/index.vue]
  <template>
    <div>
      <h1>Welcome to the homepage</h1>
      <AppAlert>
        This is an auto-imported component
      </AppAlert>
    </div>
  </template>
  ```
::
```

</ct-stack>

<ct-alert to="/products/nuxt-starter-kit/components/docs/tabs">

`::ct-code-group` is a wrapper around `::ct-tabs{variant="card"}`.

</ct-alert>

## Props

<ct-field name="sync" type="string">

Sync scope for `::ct-tabs`

</ct-field>

## Sitemap

See the full [sitemap](https://nnsvn.me/sitemap.md) for all pages.
