---
title: "ContextMenu"
description: "Всплывающее меню, которое открывается по правому щелчку на элементе и показывает доступные действия."
canonical_url: "https://b24-ui.bx-shef.by/docs/components/context-menu"
---
# ContextMenu

> Всплывающее меню, которое открывается по правому щелчку на элементе и показывает доступные действия.

## Использование

Поместите в слот по умолчанию ContextMenu любой контент и щёлкните по нему правой кнопкой, чтобы открыть меню.

```vue
<script setup lang="ts">
import type { ContextMenuItem } from '@bxshefby/b24ui-nuxt'

const items = ref<ContextMenuItem[][]>([
  [
    {
      label: 'Оформление',
      children: [
        {
          label: 'Системная'
        },
        {
          label: 'Светлая'
        },
        {
          label: 'Тёмная'
        }
      ]
    }
  ],
  [
    {
      label: 'Показать боковую панель',
      kbds: [
        'meta',
        's'
      ]
    },
    {
      label: 'Показать панель инструментов',
      kbds: [
        'shift',
        'meta',
        'd'
      ]
    },
    {
      label: 'Свернуть закреплённые вкладки',
      disabled: true
    }
  ],
  [
    {
      label: 'Обновить страницу'
    },
    {
      label: 'Очистить cookie и обновить'
    },
    {
      label: 'Очистить кэш и обновить'
    },
    {
      type: 'separator'
    },
    {
      label: 'Разработчик',
      children: [
        [
          {
            label: 'Исходный код',
            kbds: [
              'meta',
              'shift',
              'u'
            ]
          },
          {
            label: 'Инструменты разработчика',
            kbds: [
              'option',
              'meta',
              'i'
            ]
          },
          {
            label: 'Просмотр кода элемента',
            kbds: [
              'option',
              'meta',
              'c'
            ]
          }
        ],
        [
          {
            label: 'Консоль JavaScript',
            kbds: [
              'option',
              'meta',
              'j'
            ]
          }
        ]
      ]
    }
  ]
])
</script>

<template>
  <B24ContextMenu :items="items">
<div class="flex items-center justify-center rounded-md border border-dashed border-(--ui-color-design-outline-na-stroke) bg-default text-(length:--ui-font-size-sm) aspect-video w-72">
  Щёлкните правой кнопкой здесь
</div>
</B24ContextMenu>
</template>
```

### Элементы

Пропс `items` — массив объектов со свойствами:

- `label?: string`
- `icon?: IconComponent`
- `avatar?: AvatarProps`
- `kbds?: string[] | KbdProps[]`
- [`type?: "link" | "label" | "separator" | "checkbox"`](#with-checkbox-items)
- [`color?: ContextMenu['color']"`](#with-color-items)
- [`checked?: boolean`](#with-checkbox-items)
- `disabled?: boolean`
- [`slot?: string`](#with-custom-slot)
- `onSelect?: (e: Event) => void`
- [`onUpdateChecked?: (checked: boolean) => void`](#with-checkbox-items)
- `children?: ContextMenuItem[] | ContextMenuItem[][]`
- `class?: any`
- `b24ui?: { item?: ClassNameValue, label?: ClassNameValue, separator?: ClassNameValue, itemLeadingIcon?: ClassNameValue, itemLeadingAvatarSize?: ClassNameValue, itemLeadingAvatar?: ClassNameValue, itemLabel?: ClassNameValue, itemLabelExternalIcon?: ClassNameValue, itemTrailing?: ClassNameValue, itemTrailingIcon?: ClassNameValue, itemTrailingKbds?: ClassNameValue, itemTrailingKbdsSize?: ClassNameValue }`

Можно передать любое свойство компонента [Link](https://b24-ui.bx-shef.by/raw/docs/components/link.md#props): `to`, `target` и другие.

```vue
<script setup lang="ts">
import type { ContextMenuItem } from '@bxshefby/b24ui-nuxt'

const items = ref<ContextMenuItem[][]>([
  [
    {
      label: 'Оформление',
      children: [
        {
          label: 'Системная'
        },
        {
          label: 'Светлая'
        },
        {
          label: 'Тёмная'
        }
      ]
    }
  ],
  [
    {
      label: 'Показать боковую панель',
      kbds: [
        'meta',
        's'
      ]
    },
    {
      label: 'Показать панель инструментов',
      kbds: [
        'shift',
        'meta',
        'd'
      ]
    },
    {
      label: 'Свернуть закреплённые вкладки',
      disabled: true
    }
  ],
  [
    {
      label: 'Обновить страницу'
    },
    {
      label: 'Очистить cookie и обновить'
    },
    {
      label: 'Очистить кэш и обновить'
    },
    {
      type: 'separator'
    },
    {
      label: 'Разработчик',
      children: [
        [
          {
            label: 'Исходный код',
            kbds: [
              'meta',
              'shift',
              'u'
            ]
          },
          {
            label: 'Инструменты разработчика',
            kbds: [
              'option',
              'meta',
              'i'
            ]
          },
          {
            label: 'Просмотр кода элемента',
            kbds: [
              'option',
              'meta',
              'c'
            ]
          }
        ],
        [
          {
            label: 'Консоль JavaScript',
            kbds: [
              'option',
              'meta',
              'j'
            ]
          }
        ]
      ]
    }
  ]
])
</script>

<template>
  <B24ContextMenu :items="items">
<div class="flex items-center justify-center rounded-md border border-dashed border-(--ui-color-design-outline-na-stroke) text-(length:--ui-font-size-sm) bg-default aspect-video w-72">
  Щёлкните правой кнопкой здесь
</div>
</B24ContextMenu>
</template>
```

> [!NOTE]
> Чтобы получить отдельные группы элементов, передайте в `items` массив массивов.

> [!TIP]
> Чтобы создать вложенное меню, элемент может содержать массив `children` с такими же свойствами, как у `items`. Вложенным меню можно управлять через свойства `open`, `defaultOpen` и `content`.

### Модальный режим

Пропс `modal` определяет, блокирует ли ContextMenu взаимодействие с контентом вне меню. По умолчанию `true`.

```vue
<script setup lang="ts">
import type { ContextMenuItem } from '@bxshefby/b24ui-nuxt'

const items = ref<ContextMenuItem[]>([
  {
    label: 'Системная'
  },
  {
    label: 'Светлая'
  },
  {
    label: 'Тёмная'
  }
])
</script>

<template>
  <B24ContextMenu :modal="false" :items="items" :b24ui="{content:'w-48'}">
<div class="flex items-center justify-center rounded-md border border-dashed border-(--ui-color-design-outline-na-stroke) text-(length:--ui-font-size-sm) bg-default aspect-video w-72">
  Щёлкните правой кнопкой здесь
</div>
</B24ContextMenu>
</template>
```

### Отключение

Пропс `disabled` отключает ContextMenu.

```vue
<script setup lang="ts">
import type { ContextMenuItem } from '@bxshefby/b24ui-nuxt'

const items = ref<ContextMenuItem[]>([
  {
    label: 'Системная'
  },
  {
    label: 'Светлая'
  },
  {
    label: 'Тёмная'
  }
])
</script>

<template>
  <B24ContextMenu disabled :items="items">
<div class="flex items-center justify-center rounded-md border border-dashed border-(--ui-color-design-outline-na-stroke) text-(length:--ui-font-size-sm) bg-default aspect-video w-72">
  Щёлкните правой кнопкой здесь
</div>
</B24ContextMenu>
</template>
```

## Примеры

### С чекбоксами

Свойство `type` со значением `checkbox` вместе со свойствами `checked` и `onUpdateChecked` управляет отмеченным состоянием элемента.

```vue [ContextMenuCheckboxItemsExample.vue]
<script setup lang="ts">
import type { ContextMenuItem } from '@bxshefby/b24ui-nuxt'

const showSidebar = ref(true)
const showToolbar = ref(false)

const items = computed<ContextMenuItem[]>(() => [
  {
    label: 'Просмотр',
    type: 'label' as const
  },
  {
    label: 'Показывать боковое меню',
    type: 'checkbox' as const,
    checked: showSidebar.value,
    onUpdateChecked(checked: boolean) {
      showSidebar.value = checked
    },
    onSelect(e: Event) {
      e.preventDefault()
    }
  },
  {
    label: 'Показывать панель инструментов',
    type: 'checkbox' as const,
    checked: showToolbar.value,
    onUpdateChecked(checked: boolean) {
      showToolbar.value = checked
    }
  },
  {
    type: 'separator' as const
  },
  {
    label: 'Свернуть закреплённые вкладки',
    type: 'checkbox' as const,
    disabled: true
  }
])
</script>

<template>
  <B24ContextMenu :items="items">
    <div class="flex items-center justify-center rounded-md border border-dashed border-(--ui-color-design-outline-na-stroke) text-legend text-(length:--ui-font-size-sm) bg-default aspect-video w-72">
      Нажмите правой кнопкой мыши
    </div>
  </B24ContextMenu>
</template>
```

> [!NOTE]
> Чтобы состояние `checked` у элементов было реактивным, оберните массив `items` в `computed`.

### С цветом

Свойство `color` выделяет отдельные элементы цветом.

```vue [ContextMenuColorItemsExample.vue]
<script setup lang="ts">
import type { ContextMenuItem } from '@bxshefby/b24ui-nuxt'
import OpenedEyeIcon from '@bitrix24/b24icons-vue/main/OpenedEyeIcon'
import TrashBinIcon from '@bitrix24/b24icons-vue/main/TrashBinIcon'
import CopyPlatesIcon from '@bitrix24/b24icons-vue/actions/CopyPlatesIcon'
import PencilDrawIcon from '@bitrix24/b24icons-vue/actions/PencilDrawIcon'

const items: ContextMenuItem[][] = [
  [
    {
      label: 'Просмотр',
      icon: OpenedEyeIcon
    },
    {
      label: 'Копировать',
      icon: CopyPlatesIcon
    },
    {
      label: 'Изменить',
      icon: PencilDrawIcon
    }
  ],
  [
    {
      label: 'Удалить',
      color: 'air-primary-alert' as const,
      icon: TrashBinIcon
    }
  ]
]
</script>

<template>
  <B24ContextMenu :items="items">
    <div class="flex items-center justify-center rounded-md border border-dashed border-(--ui-color-design-outline-na-stroke) text-legend text-(length:--ui-font-size-sm) bg-default aspect-video w-72">
      Нажмите правой кнопкой мыши
    </div>
  </B24ContextMenu>
</template>
```

### Управление состоянием открытия `2.15+`

Состоянием открытия управляет директива `v-model:open`. Если меню открыто программно, оно привязывается к триггеру, а не к курсору.

```vue [ContextMenuOpenExample.vue]
<script setup lang="ts">
import type { ContextMenuItem } from '@bxshefby/b24ui-nuxt'
import UserIcon from '@bitrix24/b24icons-vue/common-b24/UserIcon'
import PaymentIcon from '@bitrix24/b24icons-vue/outline/PaymentIcon'
import Settings3Icon from '@bitrix24/b24icons-vue/actions/Settings3Icon'

const open = ref(false)

defineShortcuts({
  o: () => open.value = !open.value
})

const items: ContextMenuItem[] = [
  {
    label: 'Профиль',
    icon: UserIcon
  }, {
    label: 'Оплата',
    icon: PaymentIcon
  }, {
    label: 'Настройки',
    icon: Settings3Icon
  }
]
</script>

<template>
  <B24ContextMenu v-model:open="open" :items="items" :b24ui="{ content: 'w-50' }">
    <div class="flex items-center justify-center rounded-md border border-dashed border-(--ui-color-design-outline-na-stroke) text-legend text-(length:--ui-font-size-sm) bg-default aspect-video w-72">
      Нажмите правой кнопкой мыши
    </div>
  </B24ContextMenu>
</template>
```

> [!NOTE]
> В этом примере с помощью [`defineShortcuts`](https://b24-ui.bx-shef.by/raw/docs/composables/define-shortcuts.md) ContextMenu переключается клавишей <kbd value="O">
> </kbd>
> .

### Свой слот

Свойство `slot` настраивает отдельный элемент.

Вам будут доступны слоты:

- `#{{ item.slot }}`
- `#{{ item.slot }}-leading`
- `#{{ item.slot }}-label`
- `#{{ item.slot }}-trailing`

```vue [ContextMenuCustomSlotExample.vue]
<script setup lang="ts">
import type { ContextMenuItem } from '@bxshefby/b24ui-nuxt'
import SpinnerIcon from '@bitrix24/b24icons-vue/specialized/SpinnerIcon'

const loading = ref(true)

const items = [
  {
    label: 'Обновить страницу',
    slot: 'refresh' as const
  },
  {
    label: 'Очистить cookie и обновить'
  },
  {
    label: 'Очистить кэш и обновить'
  }
] satisfies ContextMenuItem[]
</script>

<template>
  <B24ContextMenu :items="items">
    <div class="flex items-center justify-center rounded-md border border-dashed border-(--ui-color-design-outline-na-stroke) text-legend text-(length:--ui-font-size-sm) bg-default aspect-video w-72">
      Нажмите правой кнопкой мыши
    </div>

    <template #refresh-label>
      {{ loading ? 'Обновление...' : 'Обновить страницу' }}
    </template>

    <template #refresh-trailing>
      <SpinnerIcon v-if="loading" class="shrink-0 size-5 text-(--ui-color-accent-main-primary) animate-spin" />
    </template>
  </B24ContextMenu>
</template>
```

> [!TIP]
> See: #slots
> Слоты `#item`, `#item-leading`, `#item-label` и `#item-trailing` настраивают сразу все элементы.

### Извлечение сочетаний клавиш

Утилита [extractShortcuts](https://b24-ui.bx-shef.by/raw/docs/composables/extract-shortcuts.md) автоматически определяет сочетания клавиш из элементов меню со свойством `kbds`. Она обходит меню рекурсивно и возвращает объект, совместимый с [defineShortcuts](https://b24-ui.bx-shef.by/raw/docs/composables/define-shortcuts.md).

```vue
<script setup lang="ts">
const items = [
  [{
    label: 'Show Sidebar',
    kbds: ['meta', 'S'],
    onSelect() {
      console.log('Show Sidebar clicked')
    }
  }, {
    label: 'Show Toolbar',
    kbds: ['shift', 'meta', 'D'],
    onSelect() {
      console.log('Show Toolbar clicked')
    }
  }, {
    label: 'Collapse Pinned Tabs',
    disabled: true
  }], [{
    label: 'Refresh the Page'
  }, {
    label: 'Clear Cookies and Refresh'
  }, {
    label: 'Clear Cache and Refresh'
  }, {
    type: 'separator' as const
  }, {
    label: 'Developer',
    children: [[{
      label: 'View Source',
      kbds: ['option', 'meta', 'U'],
      onSelect() {
        console.log('View Source clicked')
      }
    }, {
      label: 'Developer Tools',
      kbds: ['option', 'meta', 'I'],
      onSelect() {
        console.log('Developer Tools clicked')
      }
    }], [{
      label: 'Inspect Elements',
      kbds: ['option', 'meta', 'C'],
      onSelect() {
        console.log('Inspect Elements clicked')
      }
    }], [{
      label: 'JavaScript Console',
      kbds: ['option', 'meta', 'J'],
      onSelect() {
        console.log('JavaScript Console clicked')
      }
    }]]
  }]
]

defineShortcuts(extractShortcuts(items))
</script>
```

> [!NOTE]
> В этом примере сочетания <kbd value="meta">
> </kbd>
> <kbd value="S" className="ms-px">
> </kbd>
> , <kbd value="shift">
> </kbd>
> <kbd value="meta" className="ms-px">
> </kbd>
> <kbd value="D" className="ms-px">
> </kbd>
> , <kbd value="option">
> </kbd>
> <kbd value="meta" className="ms-px">
> </kbd>
> <kbd value="U" className="ms-px">
> </kbd>
> , <kbd value="option">
> </kbd>
> <kbd value="meta" className="ms-px">
> </kbd>
> <kbd value="I" className="ms-px">
> </kbd>
> , <kbd value="option">
> </kbd>
> <kbd value="meta" className="ms-px">
> </kbd>
> <kbd value="C" className="ms-px">
> </kbd>
> и <kbd value="option">
> </kbd>
> <kbd value="meta" className="ms-px">
> </kbd>
> <kbd value="J" className="ms-px">
> </kbd>
> вызывают функцию `select` соответствующего элемента.

## API

### Пропсы

```ts
/**
 * Props for the ContextMenu component
 */
interface ContextMenuProps {
  items?: T | undefined;
  /**
   * The icon displayed when an item is checked.
   * @default icons.check
   */
  checkedIcon?: (props: HTMLAttributes & VNodeProps & {}, ctx: Omit<{ attrs: Attrs; slots: Readonly<InternalSlots>; emit: (event: string, ...args: any[]) => void; expose: <Exposed extends Record<string, any> = Record<...>>(exposed?: Exposed | undefined) => void; }, "expose">): any | undefined;
  /**
   * The icon displayed when an item is loading.
   * @default icons.loading
   */
  loadingIcon?: (props: HTMLAttributes & VNodeProps & {}, ctx: Omit<{ attrs: Attrs; slots: Readonly<InternalSlots>; emit: (event: string, ...args: any[]) => void; expose: <Exposed extends Record<string, any> = Record<...>>(exposed?: Exposed | undefined) => void; }, "expose">): any | undefined;
  /**
   * The icon displayed when the item is an external link.
   * Set to `false` to hide the external icon.
   * @default true
   */
  externalIcon?: boolean | IconComponent | undefined;
  /**
   * The content of the menu.
   */
  content?: Omit<ContextMenuContentProps, "as" | "asChild" | "forceMount"> & Partial<EmitsToProps<ContextMenuContentEmits>> | undefined;
  /**
   * Render the menu in a portal.
   * @default true
   */
  portal?: string | false | true | HTMLElement | undefined;
  /**
   * The key used to get the label from the item.
   * @default 'label'
   */
  labelKey?: keyof Extract<NestedItem<T>, object> & string | DotPathKeys<Extract<NestedItem<T>, object>> | undefined;
  /**
   * The key used to get the description from the item.
   * @default 'description'
   */
  descriptionKey?: keyof Extract<NestedItem<T>, object> & string | DotPathKeys<Extract<NestedItem<T>, object>> | undefined;
  disabled?: boolean | undefined;
  b24ui?: { content?: SlotClass; viewport?: SlotClass; group?: SlotClass; label?: SlotClass; separator?: SlotClass; item?: SlotClass; itemLeadingIcon?: SlotClass; itemLeadingAvatar?: SlotClass; itemLeadingAvatarSize?: SlotClass; itemTrailing?: SlotClass; itemTrailingIcon?: SlotClass; itemTrailingKbds?: SlotClass; itemWrapper?: SlotClass; itemTrailingKbdsSize?: SlotClass; itemLabel?: SlotClass; itemDescription?: SlotClass; itemLabelExternalIcon?: SlotClass; } | undefined;
  /**
   * The duration from when the trigger is pressed until the menu opens.
   * @default 700
   */
  pressOpenDelay?: number | undefined;
  /**
   * The controlled open state of the menu. Can be used as `v-model:open`.
   */
  open?: boolean | undefined;
  /**
   * The modality of the dropdown menu.
   * 
   * When set to `true`, interaction with outside elements will be disabled and only menu content will be visible to screen readers.
   * @default true
   */
  modal?: boolean | undefined;
}
```

### Слоты

```ts
/**
 * Slots for the ContextMenu component
 */
interface ContextMenuSlots {
  default(): any;
  item(): any;
  item-leading(): any;
  item-label(): any;
  item-description(): any;
  item-trailing(): any;
  content-top(): any;
  content-bottom(): any;
}
```

### События

```ts
/**
 * Emitted events for the ContextMenu component
 */
interface ContextMenuEmits {
  update:open: (payload: [payload: boolean]) => void;
}
```

## Тема

```ts [app.config.ts]
export default defineAppConfig({
  b24ui: {
    contextMenu: {
      slots: {
        content: 'base-mode flex flex-col max-h-[min(var(--max-height-popup-menu),var(--reka-context-menu-content-available-height,var(--max-height-popup-menu)))] bg-(--ui-color-bg-content-primary) shadow-(--popup-window-box-shadow) rounded-(--ui-border-radius-xl) will-change-[opacity] motion-safe:data-[state=open]:animate-[scale-in_100ms_var(--ease-out)] motion-safe:data-[state=closed]:animate-[scale-out_100ms_var(--ease-out)] origin-(--reka-context-menu-content-transform-origin) font-[family-name:var(--ui-font-family-primary)] relative isolate px-0 py-(--menu-popup-padding) bitrix-mobile:py-0! pointer-events-auto',
        viewport: 'relative w-full min-w-48 flex-1 scroll-py-1 overflow-x-hidden overflow-y-auto scrollbar-thin',
        group: 'grid',
        label: 'w-full h-(--popup-window-delimiter-section-height) bitrix-mobile:h-[27px] px-4.5 mt-(--menu-item-block-stack-space) bitrix-mobile:pe-0 bitrix-mobile:mt-0 bitrix-mobile:-mb-[12px] flex flex-row rtl:flex-row-reverse items-center select-none outline-none whitespace-nowrap text-start text-(length:--ui-size-sm) text-(--ui-color-base-3) bitrix-mobile:[&_[data-slot=itemLabel]]:text-(--ui-color-base-5) font-(--ui-font-weight-normal) after:ms-2 after:block after:flex-1 after:min-w-3 after:h-px after:bg-(--ui-color-divider-vibrant-default)',
        separator: 'bg-(--ui-color-divider-vibrant-default) my-2 mx-4.5 h-px bitrix-mobile:my-0 bitrix-mobile:mx-0 bitrix-mobile:h-1.5',
        item: 'group w-full h-9 bitrix-mobile:h-10.5 px-4.5 mt-(--menu-item-block-stack-space) bitrix-mobile:mt-0 relative flex flex-row rtl:flex-row-reverse items-center gap-2 select-none outline-none whitespace-nowrap cursor-pointer data-disabled:cursor-not-allowed data-disabled:opacity-30 text-start text-(length:--ui-font-size-md) text-(--ui-color-base-1) hover:text-(--ui-color-base-1) data-highlighted:text-(--ui-color-base-1) data-[state=open]:text-(--ui-color-base-1) hover:bg-(--ui-color-base-black-fixed)/3 dark:hover:bg-(--ui-color-base-black-fixed) active:bg-(--ui-color-base-black-fixed)/6 dark:active:bg-(--ui-color-base-black-fixed) data-highlighted:not-active:bg-(--ui-color-base-black-fixed)/3 dark:data-highlighted:not-active:bg-(--ui-color-base-black-fixed) data-[state=open]:bg-(--ui-color-base-black-fixed)/6 dark:data-[state=open]:bg-(--ui-color-base-black-fixed) bitrix-mobile:data-[state=open]:bg-(--ui-color-bg-state-hover-default) transition-colors bitrix-mobile:[[data-slot=item]+&]:border-t bitrix-mobile:border-t-(--ui-color-divider-vibrant-default) bitrix-mobile:data-highlighted:bg-(--ui-color-bg-state-hover-default)',
        itemLeadingIcon: 'size-[25px] shrink-0 text-(--ui-color-base-5)',
        itemLeadingAvatar: 'shrink-0 size-4 me-1',
        itemLeadingAvatarSize: '2xs',
        itemTrailing: 'ml-auto rtl:ml-0 rtl:mr-auto inline-flex gap-1.5 items-center',
        itemTrailingIcon: 'shrink-0 size-[25px] text-(--ui-color-base-5)',
        itemTrailingKbds: 'shrink-0 hidden lg:inline-flex items-center gap-0.5',
        itemWrapper: 'flex-1 flex flex-col text-start min-w-0',
        itemTrailingKbdsSize: 'md',
        itemLabel: 'max-w-60 truncate -mt-px',
        itemDescription: 'max-w-60 truncate -mt-[6px] text-description text-(length:--ui-font-size-sm)',
        itemLabelExternalIcon: 'inline-block size-[25px] text-(--ui-color-base-5)'
      },
      variants: {
        color: {
          'air-primary': {
            item: 'style-filled'
          },
          'air-primary-success': {
            item: 'style-filled-success'
          },
          'air-primary-alert': {
            item: 'style-filled-alert'
          },
          'air-primary-copilot': {
            item: 'style-filled-copilot'
          },
          'air-primary-warning': {
            item: 'style-filled-warning'
          }
        },
        active: {
          true: {
            item: '',
            itemLeadingIcon: 'text-(--ui-color-accent-main-primary) hover:text-(--ui-color-accent-main-primary) group-data-[state=open]:text-(--ui-color-accent-main-primary)'
          },
          false: {}
        },
        loading: {
          true: {
            itemLeadingIcon: 'animate-spin'
          }
        }
      },
      compoundVariants: [
        {
          color: [
            'air-primary',
            'air-primary-success',
            'air-primary-alert',
            'air-primary-copilot',
            'air-primary-warning'
          ],
          active: false,
          class: {
            item: 'text-(--b24ui-background) data-highlighted:text-(--b24ui-background-hover) data-[state=open]:text-(--b24ui-background-hover)',
            itemLeadingIcon: 'text-(--b24ui-background)'
          }
        },
        {
          color: [
            'air-primary',
            'air-primary-success',
            'air-primary-alert',
            'air-primary-copilot',
            'air-primary-warning'
          ],
          active: true,
          class: {
            item: 'text-(--b24ui-background-active)',
            itemLeadingIcon: 'text-(--b24ui-background-active) group-data-[state=open]:text-(--b24ui-background-active)'
          }
        }
      ],
      defaultVariants: {}
    }
  }
})
```

## Sitemap

See the full [sitemap](/sitemap.md) for all pages.
