---
title: "Tabs"
canonical_url: "https://nnsvn.me/products/nuxt-starter-kit/components/docs/tabs"
---

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

## Usage

<ct-stack>
<div className="p-4">
<ct-tabs>
<div label="PostgreSQL" icon="lucide:database">

### PostgreSQL column types

```ts
import { integer, pgTable } from 'drizzle-orm/pg-core';

export const table = pgTable('table', {
  int: integer('int')
});
```

</div>

<div label="MySQL">

### MySQL column types

```ts
import { int, mysqlTable } from 'drizzle-orm/mysql-core';

const table = mysqlTable('table', {
int: int('int')
});
```

</div>

<div label="SQLite">

### SQLite column types

```ts
import { integer, sqliteTable } from 'drizzle-orm/sqlite-core';

const table = sqliteTable('table', {
id: integer('id')
});

// you can customize integer mode to be number, boolean, timestamp, timestamp_ms
integer('id', { mode: 'number' });
integer('id', { mode: 'boolean' });
integer('id', { mode: 'timestamp_ms' });
integer('id', { mode: 'timestamp' }); // Date
```

</div>
</ct-tabs>
</div>

```mdc
::ct-tabs
  ::div{label="PostgreSQL" icon="lucide:database"}
  ### PostgreSQL column types

  ```ts
  import { integer, pgTable } from 'drizzle-orm/pg-core';

  export const table = pgTable('table', {
    int: integer('int')
  });
  ```
  ::
  ::div{label="MySQL"}
  ### MySQL column types

  ```ts
  import { int, mysqlTable } from 'drizzle-orm/mysql-core';

  const table = mysqlTable('table', {
    int: int('int')
  });
  ```
  ::
  ::div{label="SQLite"}
  ### SQLite column types

  ```ts
  import { integer, sqliteTable } from 'drizzle-orm/sqlite-core';

  const table = sqliteTable('table', {
    id: integer('id')
  });

  // you can customize integer mode to be number, boolean, timestamp, timestamp_ms
  integer('id', { mode: 'number' });
  integer('id', { mode: 'boolean' });
  integer('id', { mode: 'timestamp_ms' });
  integer('id', { mode: 'timestamp' }); // Date
  ```
  ::
::
```

</ct-stack>

### Card Style

<ct-stack>
<div className="p-4">
<ct-tabs variant="card">
<div label="Card Tab">

### This is a card-style tab

</div>

<div label="Tab 2" icon="lucide:atom">

This is Tab #2

</div>

```ts [Code Tab]
console.log('Hello World!');
```

</ct-tabs>

:::

```mdc
::ct-tabs{variant="card"}
::div{label="Card Tab"}
### This is a card-style tab
```

</div>
</ct-stack>

<div label="Tab 2" icon="lucide:atom">

This is Tab #2

</div>

```ts [Code Tab]
console.log('Hello World!');
```

::

```text
::

### Line Style

::ct-badge{variant="outline"}
0.6.4
::

::ct-stack
  :::div{.p-4}
    ::::ct-tabs{variant="line"}
      :::::div
      ---
      class: border flex min-h-[200px] w-full justify-center p-10 items-center
        rounded-lg shadow-xs
      label: Preview
      ---
        ::::::ct-badge
        Badge
        ::::::
      :::::

      :::::div{label="Code"}
      ```tsx
      import { Badge } from "@/components/ui/badge"

      export function BadgeDemo() {
        return <Badge>Badge</Badge>
      }
      ```
      :::::
    ::::
  :::

````mdc
::ct-tabs{variant="line"}
  ::div{label="Preview" class="border flex min-h-[200px] w-full justify-center p-10 items-center rounded-lg shadow-xs"}
    :ct-badge[Badge]
  ::
  ::div{label="Code"}
    ```tsx
    import { Badge } from "@/components/ui/badge"

    export function BadgeDemo() {
      return <Badge>Badge</Badge>
    }
    ```
  ::
::
```

::

### Combobox Style

<ct-badge variant="outline">

0.7.5

</ct-badge>

<ct-stack>
<div className="p-4">
<ct-tabs variant="combobox" search-empty="No database found." search-placeholder="Search database...">
<div label="PostgreSQL">

### PostgreSQL column types

```ts
import { integer, pgTable } from 'drizzle-orm/pg-core';

export const table = pgTable('table', {
  int: integer('int')
});
```

</div>

<div label="MySQL">

### MySQL column types

```ts
import { int, mysqlTable } from 'drizzle-orm/mysql-core';

const table = mysqlTable('table', {
int: int('int')
});
```

</div>

<div label="SQLite">

### SQLite column types

```ts
import { integer, sqliteTable } from 'drizzle-orm/sqlite-core';

const table = sqliteTable('table', {
id: integer('id')
});

// you can customize integer mode to be number, boolean, timestamp, timestamp_ms
integer('id', { mode: 'number' });
integer('id', { mode: 'boolean' });
integer('id', { mode: 'timestamp_ms' });
integer('id', { mode: 'timestamp' }); // Date
```

</div>
</ct-tabs>
</div>

```mdc
::ct-tabs{variant="combobox" search-placeholder="Search database..." search-empty="No database found."}
  ::div{label="PostgreSQL"}
  ### PostgreSQL column types

  ```ts
  import { integer, pgTable } from 'drizzle-orm/pg-core';

  export const table = pgTable('table', {
    int: integer('int')
  });
  ```
  ::
  ::div{label="MySQL"}
  ### MySQL column types

  ```ts
  import { int, mysqlTable } from 'drizzle-orm/mysql-core';

  const table = mysqlTable('table', {
    int: int('int')
  });
  ```
  ::
  ::div{label="SQLite"}
  ### SQLite column types

  ```ts
  import { integer, sqliteTable } from 'drizzle-orm/sqlite-core';

  const table = sqliteTable('table', {
    id: integer('id')
  });

  // you can customize integer mode to be number, boolean, timestamp, timestamp_ms
  integer('id', { mode: 'number' });
  integer('id', { mode: 'boolean' });
  integer('id', { mode: 'timestamp_ms' });
  integer('id', { mode: 'timestamp' }); // Date
  ```
  ::
::
```

</ct-stack>

### Synced Tabs

<ct-badge variant="outline">

0.8.0

</ct-badge>

<ct-read-more to="/products/nuxt-starter-kit/components/docs/pm">



</ct-read-more>

<ct-stack>
<div className="p-4,md:p-8">

#### Scope 1

<ct-tabs variant="card" sync="your-scope-name">
<div label="Card Tab">

### This is a card-style tab

</div>

```ts [Code Tab]
console.log('Hello World!');
```

</ct-tabs>

<ct-tabs variant="card" sync="your-scope-name">
<div label="Card Tab">

### This is a card-style tab

</div>

<div label="Tab 2" icon="lucide:atom">

This is Tab #2

</div>

```ts [Code Tab]
console.log('Hello World!');
```

</ct-tabs>

#### Scope 2

<ct-tabs variant="line" sync="scope2">
<div label="Card Tab">

### This is a card-style tab

</div>

<div label="Tab 2" icon="lucide:atom">

This is Tab #2

</div>

```ts [Code Tab]
console.log('Hello World!');
```

</ct-tabs>

<ct-tabs variant="separate" sync="scope2">
<div label="Card Tab">

### This is a card-style tab

</div>

<div label="Tab 2" icon="lucide:atom">

This is Tab #2

</div>

```ts [Code Tab]
console.log('Hello World!');
```

</ct-tabs>
</div>

```mdc
#### Scope 1
::ct-tabs{variant="card" sync="your-scope-name"}
  ::div{label="Card Tab"}
  ### This is a card-style tab
  ::
  ```ts [Code Tab]
  console.log('Hello World!');
  ```
::
::ct-tabs{variant="card" sync="your-scope-name"}
  ::div{label="Card Tab"}
  ### This is a card-style tab
  ::
  ::div{label="Tab 2" icon="lucide:atom"}
  This is Tab #2
  ::
  ```ts [Code Tab]
  console.log('Hello World!');
  ```
::

#### Scope 2
::ct-tabs{variant="line" sync="scope2"}
  ::div{label="Card Tab"}
  ### This is a card-style tab
  ::
  ::div{label="Tab 2" icon="lucide:atom"}
  This is Tab #2
  ::
  ```ts [Code Tab]
  console.log('Hello World!');
  ```
::
::ct-tabs{variant="separate" sync="scope2"}
  ::div{label="Card Tab"}
  ### This is a card-style tab
  ::
  ::div{label="Tab 2" icon="lucide:atom"}
  This is Tab #2
  ::
  ```ts [Code Tab]
  console.log('Hello World!');
  ```
::
```

</ct-stack>

## Props

<ct-field-group>
<ct-field name="variant" type="'separate' | 'card' | 'line' | 'combobox'" default-value="'separate'">



</ct-field>

<ct-field name="padded" type="boolean" default-value="true">



</ct-field>

<ct-field name="disableSearch" type="boolean" default-value="false">

For combobox variant

</ct-field>

<ct-field name="searchPlaceholder" type="string" default-value="'Search Tab...'">

For combobox variant

</ct-field>

<ct-field name="searchEmpty" type="string" default-value="'No tab found.'">

For combobox variant

</ct-field>

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

Sync scope

</ct-field>
</ct-field-group>

## Sitemap

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