Использование
Компонент NavigationMenu показывает список ссылок по горизонтали или по вертикали.
<script setup lang="ts">
import type { NavigationMenuItem } from '@bxshefby/b24ui-nuxt'
const items = ref<NavigationMenuItem[]>([
{
label: 'Управление продажами',
type: 'trigger',
children: [
{
label: 'Управление лидами'
},
{
label: 'Управление сделками'
},
{
label: 'Воронки'
},
{
label: 'Права доступа'
}
]
},
{
label: 'Совместная работа',
type: 'trigger',
children: [
{
label: 'Онлайн-офис',
to: 'https://www.bitrix24.com/tools/communications/online-workspace.php'
},
{
label: 'CoPilot в чате',
to: 'https://www.bitrix24.com/tools/copilot-ai-powered-tools-for-business.php#copilot-in-chat'
},
{
label: 'useToast',
to: '/docs/composables/use-toast'
}
]
},
{
label: 'HR и автоматизация',
type: 'trigger',
badge: 5,
active: true,
children: [
{
label: 'Управление сотрудниками',
to: 'https://www.bitrix24.com/tools/hr_automation/employee-management.php'
},
{
label: 'Культура и вовлечённость',
to: 'https://www.bitrix24.com/tools/hr_automation/culture-and-engagement.php'
},
{
label: 'Автоматизация',
to: 'https://www.bitrix24.com/tools/hr_automation/automation.php',
target: '_blank'
}
]
},
{
label: 'GitHub',
to: 'https://github.com/bitrix24/b24ui',
target: '_blank'
},
{
label: 'Справка',
disabled: true
}
])
</script>
<template>
<B24NavigationMenu :items="items" />
</template>
<script setup lang="ts">
import { ref } from 'vue'
import type { NavigationMenuItem } from '@bxshefby/b24ui-nuxt'
const items = ref<NavigationMenuItem[]>([
{
label: 'Управление продажами',
type: 'trigger',
children: [
{
label: 'Управление лидами'
},
{
label: 'Управление сделками'
},
{
label: 'Воронки'
},
{
label: 'Права доступа'
}
]
},
{
label: 'Совместная работа',
type: 'trigger',
children: [
{
label: 'Онлайн-офис',
to: 'https://www.bitrix24.com/tools/communications/online-workspace.php'
},
{
label: 'CoPilot в чате',
to: 'https://www.bitrix24.com/tools/copilot-ai-powered-tools-for-business.php#copilot-in-chat'
},
{
label: 'useToast',
to: '/docs/composables/use-toast'
}
]
},
{
label: 'HR и автоматизация',
type: 'trigger',
badge: 5,
active: true,
children: [
{
label: 'Управление сотрудниками',
to: 'https://www.bitrix24.com/tools/hr_automation/employee-management.php'
},
{
label: 'Культура и вовлечённость',
to: 'https://www.bitrix24.com/tools/hr_automation/culture-and-engagement.php'
},
{
label: 'Автоматизация',
to: 'https://www.bitrix24.com/tools/hr_automation/automation.php',
target: '_blank'
}
]
},
{
label: 'GitHub',
to: 'https://github.com/bitrix24/b24ui',
target: '_blank'
},
{
label: 'Справка',
disabled: true
}
])
</script>
<template>
<B24NavigationMenu :items="items" />
</template>
Элементы
Пропс items — массив объектов со свойствами:
label?: stringicon?: IconComponentavatar?: AvatarPropsbadge?: string | number | BadgePropschip?: boolean | ChipPropshint?: stringtooltip?: TooltipPropspopover?: PopoverPropstrailingIcon?: IconComponenttype?: 'label' | 'trigger' | 'link'defaultOpen?: booleanopen?: booleanvalue?: stringdisabled?: booleanslot?: stringviewportRtl?: booleanonSelect?: (e: Event) => voidchildren?: NavigationMenuChildItem[]class?: anyb24ui?: { linkLeadingAvatarSize?: ClassNameValue, linkLeadingAvatar?: ClassNameValue, linkLeadingIcon?: ClassNameValue, linkLeadingChipSize?: ClassNameValue, linkLabel?: ClassNameValue, linkLabelExternalIcon?: ClassNameValue, linkTrailing?: ClassNameValue, linkLeadingHint?: ClassNameValue, linkLeadingBadgeSize?: ClassNameValue, linkLeadingBadge?: ClassNameValue, linkTrailingIcon?: ClassNameValue, label?: ClassNameValue, link?: ClassNameValue, content?: ClassNameValue, childList?: ClassNameValue, childLabel?: ClassNameValue, childItem?: ClassNameValue, childLink?: ClassNameValue, childLinkIcon?: ClassNameValue, childLinkHint?: ClassNameValue, childLinkBadgeSize?: ClassNameValue, childLinkBadge?: ClassNameValue, childLinkWrapper?: ClassNameValue, childLinkLabel?: ClassNameValue, childLinkLabelExternalIcon?: ClassNameValue, popoverWrapper?: ClassNameValue }
Можно передать любое свойство компонента Link, например to, target и другие.
<script setup lang="ts">
import type { NavigationMenuItem } from '@bxshefby/b24ui-nuxt'
const items = ref<NavigationMenuItem[]>([
{
label: 'Управление продажами',
type: 'trigger',
hint: 'note',
children: [
{
label: 'Управление лидами'
},
{
label: 'Управление сделками'
},
{
label: 'Воронки',
hint: 'note'
},
{
label: 'Права доступа'
}
]
},
{
label: 'Совместная работа',
type: 'trigger',
children: [
{
label: 'Онлайн-офис',
to: 'https://www.bitrix24.com/tools/communications/online-workspace.php'
},
{
label: 'CoPilot в чате',
to: 'https://www.bitrix24.com/tools/copilot-ai-powered-tools-for-business.php#copilot-in-chat'
},
{
label: 'useToast',
to: '/docs/composables/use-toast'
}
]
},
{
label: 'HR и автоматизация',
type: 'trigger',
badge: 5,
active: true,
children: [
{
label: 'Управление сотрудниками',
to: 'https://www.bitrix24.com/tools/hr_automation/employee-management.php'
},
{
label: 'Культура и вовлечённость',
to: 'https://www.bitrix24.com/tools/hr_automation/culture-and-engagement.php'
},
{
label: 'Автоматизация',
to: 'https://www.bitrix24.com/tools/hr_automation/automation.php',
target: '_blank'
}
]
},
{
label: 'GitHub',
to: 'https://github.com/bitrix24/b24ui',
target: '_blank'
},
{
label: 'Справка',
disabled: true
}
])
</script>
<template>
<B24NavigationMenu :items="items" class="w-full justify-center" />
</template>
<script setup lang="ts">
import { ref } from 'vue'
import type { NavigationMenuItem } from '@bxshefby/b24ui-nuxt'
const items = ref<NavigationMenuItem[]>([
{
label: 'Управление продажами',
type: 'trigger',
hint: 'note',
children: [
{
label: 'Управление лидами'
},
{
label: 'Управление сделками'
},
{
label: 'Воронки',
hint: 'note'
},
{
label: 'Права доступа'
}
]
},
{
label: 'Совместная работа',
type: 'trigger',
children: [
{
label: 'Онлайн-офис',
to: 'https://www.bitrix24.com/tools/communications/online-workspace.php'
},
{
label: 'CoPilot в чате',
to: 'https://www.bitrix24.com/tools/copilot-ai-powered-tools-for-business.php#copilot-in-chat'
},
{
label: 'useToast',
to: '/docs/composables/use-toast'
}
]
},
{
label: 'HR и автоматизация',
type: 'trigger',
badge: 5,
active: true,
children: [
{
label: 'Управление сотрудниками',
to: 'https://www.bitrix24.com/tools/hr_automation/employee-management.php'
},
{
label: 'Культура и вовлечённость',
to: 'https://www.bitrix24.com/tools/hr_automation/culture-and-engagement.php'
},
{
label: 'Автоматизация',
to: 'https://www.bitrix24.com/tools/hr_automation/automation.php',
target: '_blank'
}
]
},
{
label: 'GitHub',
to: 'https://github.com/bitrix24/b24ui',
target: '_blank'
},
{
label: 'Справка',
disabled: true
}
])
</script>
<template>
<B24NavigationMenu :items="items" class="w-full justify-center" />
</template>
items можно передать и массив массивов, чтобы показать группы элементов.children:label: stringicon?: IconComponentonSelect?(e: Event): voidclass?: any
items, children принимает только плоский массив: вложенный массив разворачивается и отрисовывается без разделителя, а в режиме разработки в консоль пишется предупреждение.Ориентация
Пропс orientation меняет ориентацию NavigationMenu.
open и defaultOpen, а поведением — пропсы collapsible и type.collapsed не задан) дочерние элементы отрисовываются рекурсивно как обычные элементы, поэтому их стилизует b24ui.link. b24ui.childLink применяется только к content в horizontal-ориентации и к popover при collapsed.viewportRtl, чтобы выпадающее меню позиционировалось правильно.<script setup lang="ts">
import type { NavigationMenuItem } from '@bxshefby/b24ui-nuxt'
const items = ref<NavigationMenuItem[][]>([
[
{
label: 'Ссылки',
type: 'label'
},
{
label: 'Управление продажами',
type: 'trigger',
hint: 'note',
defaultOpen: true,
children: [
{
label: 'Управление лидами'
},
{
label: 'Управление сделками'
},
{
label: 'Воронки',
hint: 'note'
},
{
label: 'Права доступа'
}
]
}
],
[
{
label: 'GitHub',
to: 'https://github.com/bitrix24/b24ui',
target: '_blank'
},
{
label: 'Справка',
disabled: true
},
{
label: 'HR и автоматизация',
type: 'trigger',
viewportRtl: true,
badge: 5,
active: true,
children: [
{
label: 'Управление сотрудниками',
to: 'https://www.bitrix24.com/tools/hr_automation/employee-management.php'
},
{
label: 'Культура и вовлечённость',
to: 'https://www.bitrix24.com/tools/hr_automation/culture-and-engagement.php'
},
{
label: 'Автоматизация',
to: 'https://www.bitrix24.com/tools/hr_automation/automation.php',
target: '_blank'
}
]
}
]
])
</script>
<template>
<B24NavigationMenu orientation="vertical" :items="items" class="data-[orientation=vertical]:w-[430px]" />
</template>
<script setup lang="ts">
import { ref } from 'vue'
import type { NavigationMenuItem } from '@bxshefby/b24ui-nuxt'
const items = ref<NavigationMenuItem[][]>([
[
{
label: 'Ссылки',
type: 'label'
},
{
label: 'Управление продажами',
type: 'trigger',
hint: 'note',
defaultOpen: true,
children: [
{
label: 'Управление лидами'
},
{
label: 'Управление сделками'
},
{
label: 'Воронки',
hint: 'note'
},
{
label: 'Права доступа'
}
]
}
],
[
{
label: 'GitHub',
to: 'https://github.com/bitrix24/b24ui',
target: '_blank'
},
{
label: 'Справка',
disabled: true
},
{
label: 'HR и автоматизация',
type: 'trigger',
viewportRtl: true,
badge: 5,
active: true,
children: [
{
label: 'Управление сотрудниками',
to: 'https://www.bitrix24.com/tools/hr_automation/employee-management.php'
},
{
label: 'Культура и вовлечённость',
to: 'https://www.bitrix24.com/tools/hr_automation/culture-and-engagement.php'
},
{
label: 'Автоматизация',
to: 'https://www.bitrix24.com/tools/hr_automation/automation.php',
target: '_blank'
}
]
}
]
])
</script>
<template>
<B24NavigationMenu orientation="vertical" :items="items" class="data-[orientation=vertical]:w-[430px]" />
</template>
Свёрнутое меню
При vertical-ориентации пропс collapsed сворачивает NavigationMenu. Это удобно, например, в боковом меню.
Иконка справа
Пропс trailing-icon меняет иконку справа у каждого элемента. Иконка показывается, только если у элемента есть дочерние.
trailingIcon в объекте элемента.<script setup lang="ts">
import RocketIcon from '@bitrix24/b24icons-vue/main/RocketIcon'
import type { NavigationMenuItem } from '@bxshefby/b24ui-nuxt'
const items = ref<NavigationMenuItem[]>([
{
label: 'Управление продажами',
type: 'trigger',
children: [
{
label: 'Управление лидами'
},
{
label: 'Управление сделками'
},
{
label: 'Воронки'
},
{
label: 'Права доступа'
}
]
},
{
label: 'Совместная работа',
type: 'trigger',
children: [
{
label: 'Онлайн-офис',
to: 'https://www.bitrix24.com/tools/communications/online-workspace.php'
},
{
label: 'CoPilot в чате',
to: 'https://www.bitrix24.com/tools/copilot-ai-powered-tools-for-business.php#copilot-in-chat'
},
{
label: 'useToast',
to: '/docs/composables/use-toast'
}
]
},
{
label: 'HR и автоматизация',
type: 'trigger',
badge: 5,
active: true,
children: [
{
label: 'Управление сотрудниками',
to: 'https://www.bitrix24.com/tools/hr_automation/employee-management.php'
},
{
label: 'Культура и вовлечённость',
to: 'https://www.bitrix24.com/tools/hr_automation/culture-and-engagement.php'
},
{
label: 'Автоматизация',
to: 'https://www.bitrix24.com/tools/hr_automation/automation.php',
target: '_blank'
}
]
}
])
</script>
<template>
<B24NavigationMenu :trailing-icon="RocketIcon" :items="items" class="w-full justify-center" />
</template>
<script setup lang="ts">
import { ref } from 'vue'
import RocketIcon from '@bitrix24/b24icons-vue/main/RocketIcon'
import type { NavigationMenuItem } from '@bxshefby/b24ui-nuxt'
const items = ref<NavigationMenuItem[]>([
{
label: 'Управление продажами',
type: 'trigger',
children: [
{
label: 'Управление лидами'
},
{
label: 'Управление сделками'
},
{
label: 'Воронки'
},
{
label: 'Права доступа'
}
]
},
{
label: 'Совместная работа',
type: 'trigger',
children: [
{
label: 'Онлайн-офис',
to: 'https://www.bitrix24.com/tools/communications/online-workspace.php'
},
{
label: 'CoPilot в чате',
to: 'https://www.bitrix24.com/tools/copilot-ai-powered-tools-for-business.php#copilot-in-chat'
},
{
label: 'useToast',
to: '/docs/composables/use-toast'
}
]
},
{
label: 'HR и автоматизация',
type: 'trigger',
badge: 5,
active: true,
children: [
{
label: 'Управление сотрудниками',
to: 'https://www.bitrix24.com/tools/hr_automation/employee-management.php'
},
{
label: 'Культура и вовлечённость',
to: 'https://www.bitrix24.com/tools/hr_automation/culture-and-engagement.php'
},
{
label: 'Автоматизация',
to: 'https://www.bitrix24.com/tools/hr_automation/automation.php',
target: '_blank'
}
]
}
])
</script>
<template>
<B24NavigationMenu :trailing-icon="RocketIcon" :items="items" class="w-full justify-center" />
</template>
Область просмотра 2.15+
Пропс viewport управляет отрисовкой области просмотра NavigationMenu, например её align.
orientation равном horizontal.<script setup lang="ts">
import type { NavigationMenuItem } from '@bxshefby/b24ui-nuxt'
const items = ref<NavigationMenuItem[]>([
{
label: 'Управление продажами',
type: 'trigger',
children: [
{
label: 'Управление лидами'
},
{
label: 'Управление сделками'
},
{
label: 'Воронки'
},
{
label: 'Права доступа'
}
]
},
{
label: 'Совместная работа',
type: 'trigger',
children: [
{
label: 'Онлайн-офис',
to: 'https://www.bitrix24.com/tools/communications/online-workspace.php'
},
{
label: 'CoPilot в чате',
to: 'https://www.bitrix24.com/tools/copilot-ai-powered-tools-for-business.php#copilot-in-chat'
},
{
label: 'useToast',
to: '/docs/composables/use-toast'
}
]
},
{
label: 'HR и автоматизация',
type: 'trigger',
badge: 5,
active: true,
children: [
{
label: 'Управление сотрудниками',
to: 'https://www.bitrix24.com/tools/hr_automation/employee-management.php'
},
{
label: 'Культура и вовлечённость',
to: 'https://www.bitrix24.com/tools/hr_automation/culture-and-engagement.php'
},
{
label: 'Автоматизация',
to: 'https://www.bitrix24.com/tools/hr_automation/automation.php',
target: '_blank'
}
]
}
])
</script>
<template>
<B24NavigationMenu
:viewport="{
align: 'start'
}"
:items="items"
class="w-full justify-center"
/>
</template>
<script setup lang="ts">
import { ref } from 'vue'
import type { NavigationMenuItem } from '@bxshefby/b24ui-nuxt'
const items = ref<NavigationMenuItem[]>([
{
label: 'Управление продажами',
type: 'trigger',
children: [
{
label: 'Управление лидами'
},
{
label: 'Управление сделками'
},
{
label: 'Воронки'
},
{
label: 'Права доступа'
}
]
},
{
label: 'Совместная работа',
type: 'trigger',
children: [
{
label: 'Онлайн-офис',
to: 'https://www.bitrix24.com/tools/communications/online-workspace.php'
},
{
label: 'CoPilot в чате',
to: 'https://www.bitrix24.com/tools/copilot-ai-powered-tools-for-business.php#copilot-in-chat'
},
{
label: 'useToast',
to: '/docs/composables/use-toast'
}
]
},
{
label: 'HR и автоматизация',
type: 'trigger',
badge: 5,
active: true,
children: [
{
label: 'Управление сотрудниками',
to: 'https://www.bitrix24.com/tools/hr_automation/employee-management.php'
},
{
label: 'Культура и вовлечённость',
to: 'https://www.bitrix24.com/tools/hr_automation/culture-and-engagement.php'
},
{
label: 'Автоматизация',
to: 'https://www.bitrix24.com/tools/hr_automation/automation.php',
target: '_blank'
}
]
}
])
</script>
<template>
<B24NavigationMenu
:viewport="{
align: 'start'
}"
:items="items"
class="w-full justify-center"
/>
</template>
Выгрузка содержимого
Пропс unmount-on-hide управляет выгрузкой содержимого. По умолчанию true.
<script setup lang="ts">
import type { NavigationMenuItem } from '@bxshefby/b24ui-nuxt'
const items = ref<NavigationMenuItem[]>([
{
label: 'Управление продажами',
type: 'trigger',
children: [
{
label: 'Управление лидами'
},
{
label: 'Управление сделками'
},
{
label: 'Воронки'
},
{
label: 'Права доступа'
}
]
},
{
label: 'Совместная работа',
type: 'trigger',
children: [
{
label: 'Онлайн-офис',
to: 'https://www.bitrix24.com/tools/communications/online-workspace.php'
},
{
label: 'CoPilot в чате',
to: 'https://www.bitrix24.com/tools/copilot-ai-powered-tools-for-business.php#copilot-in-chat'
},
{
label: 'useToast',
to: '/docs/composables/use-toast'
}
]
},
{
label: 'HR и автоматизация',
type: 'trigger',
badge: 5,
active: true,
children: [
{
label: 'Управление сотрудниками',
to: 'https://www.bitrix24.com/tools/hr_automation/employee-management.php'
},
{
label: 'Культура и вовлечённость',
to: 'https://www.bitrix24.com/tools/hr_automation/culture-and-engagement.php'
},
{
label: 'Автоматизация',
to: 'https://www.bitrix24.com/tools/hr_automation/automation.php',
target: '_blank'
}
]
}
])
</script>
<template>
<B24NavigationMenu :unmount-on-hide="false" :items="items" class="w-full justify-center" />
</template>
<script setup lang="ts">
import { ref } from 'vue'
import type { NavigationMenuItem } from '@bxshefby/b24ui-nuxt'
const items = ref<NavigationMenuItem[]>([
{
label: 'Управление продажами',
type: 'trigger',
children: [
{
label: 'Управление лидами'
},
{
label: 'Управление сделками'
},
{
label: 'Воронки'
},
{
label: 'Права доступа'
}
]
},
{
label: 'Совместная работа',
type: 'trigger',
children: [
{
label: 'Онлайн-офис',
to: 'https://www.bitrix24.com/tools/communications/online-workspace.php'
},
{
label: 'CoPilot в чате',
to: 'https://www.bitrix24.com/tools/copilot-ai-powered-tools-for-business.php#copilot-in-chat'
},
{
label: 'useToast',
to: '/docs/composables/use-toast'
}
]
},
{
label: 'HR и автоматизация',
type: 'trigger',
badge: 5,
active: true,
children: [
{
label: 'Управление сотрудниками',
to: 'https://www.bitrix24.com/tools/hr_automation/employee-management.php'
},
{
label: 'Культура и вовлечённость',
to: 'https://www.bitrix24.com/tools/hr_automation/culture-and-engagement.php'
},
{
label: 'Автоматизация',
to: 'https://www.bitrix24.com/tools/hr_automation/automation.php',
target: '_blank'
}
]
}
])
</script>
<template>
<B24NavigationMenu :unmount-on-hide="false" :items="items" class="w-full justify-center" />
</template>
Примеры
Управление активным элементом
Активным элементом (элементами) управляют пропс default-value или директива v-model со значением value элемента. Если value не задан, по умолчанию используется item-${index} для элементов верхнего уровня и item-${level}-${index} для вложенных.
value-key меняет ключ, по которому сопоставляются элементы при v-model или default-value.defineShortcuts активный элемент переключается нажатием 1, 2 или 3.С подсказкой в элементах
При vertical-ориентации и свёрнутом меню (collapsed) пропс tooltip со значением true показывает Tooltip с подписью элемента. Свойство tooltip у отдельного элемента переопределяет подсказку по умолчанию. При horizontal-ориентации Tooltip для элементов задаётся свойством tooltip у элемента.
tooltip у элемента всегда показывает подсказку независимо от общего пропса tooltip.Любое свойство компонента Tooltip можно передать глобально или для каждого элемента.
С popover в элементах
При vertical-ориентации и свёрнутом меню (collapsed) пропс popover со значением true показывает Popover с дочерними элементами. Свойство popover у отдельного элемента переопределяет popover по умолчанию.
popover у элемента всегда показывает popover независимо от общего пропса popover.Любое свойство компонента Popover можно передать глобально или для каждого элемента.
С чипом в элементах
Свойство chip показывает Chip вокруг иконки элемента; можно передать любые его пропсы.
С нижней панелью вкладок
Пропс b24ui превращает NavigationMenu в мобильную нижнюю панель вкладок с иконками и мелкими подписями.
Со свёрнутыми подписями
Пропс b24ui показывает под каждой иконкой подпись в свёрнутом состоянии.
С собственным слотом
Свойство slot настраивает отдельный элемент.
Вам будут доступны слоты:
#{{ item.slot }}#{{ item.slot }}-leading#{{ item.slot }}-label#{{ item.slot }}-trailing#{{ item.slot }}-content
#item, #item-leading, #item-label, #item-trailing и #item-content настраивают все элементы сразу.Со слотом trailing
Слот #item-trailing или свойство slot (#{{ item.slot }}-trailing) добавляет DropdownMenu, который появляется при наведении, как в Notion или Linear.
Со слотом content
Слот #item-content или свойство slot (#{{ item.slot }}-content) настраивает содержимое отдельного элемента.
sm:w-(--reka-navigation-menu-viewport-width) добавлен к viewport, чтобы ширина была динамической. Для этого у первого дочернего элемента содержимого должна быть задана ширина.API
Пропсы
Слоты
События
Тема
export default {
slots: {
root: 'relative flex [&>div]:min-w-0 font-[family-name:var(--ui-font-family-secondary)]',
list: 'isolate min-w-0',
label: 'w-full h-5.5 overflow-hidden mt-2.5 opacity-70 text-legend text-(length:--ui-font-size-sm)',
item: 'min-w-0',
link: 'min-w-9.5 w-full max-w-full p-0 m-0 group relative cursor-pointer flex items-center gap-0.5 font-(--ui-font-weight-normal) text-(length:--ui-font-size-lg) focus:outline-none focus-visible:rounded-(--menu-item-border-radius) focus-visible:outline-none focus-visible:ring-inset focus-visible:ring-1 focus-visible:ring-(--ui-color-base-4) rounded-(--menu-item-border-radius) text-(--menu-item-color) bg-(--menu-item-background) hover:bg-(--menu-item-background-hover) data-[state=open]:bg-(--menu-item-background-hover) border-0',
linkLeadingIcon: 'shrink-0 size-6.5',
linkLeadingAvatar: 'shrink-0 size-5',
linkLeadingAvatarSize: '2xs',
linkLeadingChipSize: 'sm',
linkLeadingHint: 'inline-flex m-0 absolute -top-[5px] left-2 text-(length:--ui-font-size-4xs) leading-2 font-semibold text-description uppercase ml-px',
linkLeadingBadge: 'inline-flex m-0 absolute',
linkLeadingBadgeSize: 'xs',
linkTrailing: 'group inline-flex mt-0.5 items-center',
linkTrailingIcon: 'shrink-0 size-[25px] text-(--ui-color-base-5)',
linkLabel: 'truncate',
linkLabelWrapper: 'flex items-center rtl:flex-row-reverse',
linkLabelExternalIcon: 'ml-auto inline-block size-[25px] text-(--ui-color-base-5)',
childList: 'isolate',
childLabel: '',
childItem: 'h-9 mt-(--menu-item-block-stack-space)',
childLink: 'group relative size-full flex flex-row rtl:flex-row-reverse items-center transition-colors gap-2 text-start cursor-pointer select-none outline-none data-disabled:cursor-not-allowed data-disabled:opacity-30 transition-colors',
childLinkWrapper: 'min-w-0 flex-1 flex flex-row items-center justify-start rtl:justify-end gap-2',
childLinkIcon: 'size-[25px] shrink-0 text-(--ui-color-base-5)',
childLinkHint: 'inline-flex m-0 absolute -top-0.5 left-6 text-(length:--ui-font-size-4xs) leading-2 font-semibold text-description uppercase ml-px',
childLinkBadge: 'inline-flex m-0',
childLinkBadgeSize: 'xs',
childLinkLabel: 'truncate ms-0.5 -mt-px',
childLinkLabelExternalIcon: 'inline-block size-[25px] text-(--ui-color-base-5)',
separator: 'h-px bg-(--leftmenu-bg-divider) my-4',
popoverWrapper: 'px-0 py-(--menu-popup-padding)',
viewportWrapper: 'absolute top-[53px] start-0 flex w-full',
viewport: 'relative w-full base-mode bg-(--ui-color-bg-content-primary) shadow-(--popup-window-box-shadow) h-(--reka-navigation-menu-viewport-height) w-(--reka-navigation-menu-viewport-width) left-(--reka-navigation-menu-viewport-left) rtl:left-auto rtl:right-[calc(100%-var(--reka-navigation-menu-viewport-left)-var(--reka-navigation-menu-viewport-width))] rounded-(--ui-border-radius-xl) will-change-[opacity] transition-[width,height,left,right] duration-200 motion-reduce:transition-none origin-[top_center] z-1 overflow-x-hidden overflow-y-auto scrollbar-thin',
content: ''
},
variants: {
orientation: {
horizontal: {
root: 'relative h-full items-center justify-between',
list: 'flex items-center gap-x-1 h-full',
item: 'empty:hidden',
link: 'menu-item-horizontal h-8 min-h-8 px-2.5 leading-7 border border-(--menu-item-background) hover:border-(--ui-color-design-plain-na-focused-stroke) data-[state=open]:bg-(--ui-color-design-plain-na-focused-stroke) bitrix-mobile:px-3 bitrix-mobile:h-8.5 bitrix-mobile:min-h-8.5 bitrix-mobile:text-(--ui-color-base-4) bitrix-mobile:border-(--ui-color-base-7) bitrix-mobile:leading-6 bitrix-mobile:text-(length:--ui-font-size-md) bitrix-mobile:scale-x-[0.92]',
linkTrailingIcon: 'size-4',
linkLeadingBadge: '-top-1.5 -right-3.5 -translate-x-1/2',
linkLabelWrapper: 'gap-1 truncate justify-between',
childList: 'grid px-0 py-(--menu-popup-padding)',
childLink: 'px-4.5 min-w-[195px] whitespace-nowrap font-[family-name:var(--ui-font-family-primary)] 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]active:bg-(--ui-color-base-black-fixed)/6 dark:data-[state=open]active:bg-(--ui-color-base-black-fixed) bitrix-mobile:data-[state=open]:bg-(--ui-color-bg-state-hover-default)',
childLinkLabel: ''
},
vertical: {
root: 'flex-col w-full ps-0 pe-0 rtl:pe-0 rtl:ps-0',
list: 'flex flex-col',
item: 'mt-(--menu-item-block-stack-space) data-[state=open]:rounded-(--menu-item-border-radius) data-[state=open]:border-(length:--leftmenu-group-stroke-weight) data-[state=open]:border-(--leftmenu-group-stroke)',
link: 'menu-item-vertical h-9.5 min-h-9.5 p-1.5 flex-row rtl:flex-row-reverse justify-between data-[state=open]:text-(length:--ui-font-size-sm) data-[state=open]:opacity-70',
linkLeadingIcon: '',
linkTrailingIcon: 'size-5 group-data-[state=open]:rotate-180 transition-transform duration-200 motion-reduce:transition-none',
linkLeadingBadge: '-top-2 left-6 -translate-x-1/2',
linkLabelWrapper: 'relative h-5.5 w-full',
childList: '',
childLink: 'px-4.5 min-w-[195px] whitespace-nowrap font-[family-name:var(--ui-font-family-primary)] 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-divider-optical-1-alt) data-highlighted:bg-(--ui-color-divider-optical-1-alt) data-[state=open]:bg-(--ui-color-divider-optical-1-alt)',
childLabel: 'w-full min-w-[195px] h-(--popup-window-delimiter-section-height) px-4.5 mt-(--menu-item-block-stack-space) flex flex-row rtl:flex-row-reverse items-center select-none outline-none whitespace-nowrap text-start text-(length:--ui-size-sm) text-legend font-(--ui-font-weight-normal) after:ms-2.5 after:block after:flex-1 after:min-w-[15px] after:h-px after:bg-(--ui-color-divider-vibrant-default)'
}
},
active: {
true: {
link: '',
childLink: 'bg-(--ui-color-base-black-fixed)/3',
childLinkIcon: ''
},
false: {
linkLeadingIcon: 'text-(--ui-color-base-5)',
childLinkIcon: 'text-(--ui-color-base-5)'
}
},
disabled: {
true: {
link: 'cursor-not-allowed opacity-75'
}
},
level: {
true: ''
},
collapsed: {
true: ''
}
},
compoundVariants: [
{
orientation: 'horizontal',
class: {
childList: '',
content: 'w-60'
}
},
{
orientation: 'vertical',
collapsed: false,
class: {
item: 'data-[state=open]:bg-(--leftmenu-group-bg)',
childList: 'mb-0.5',
childItem: '',
linkLeadingAvatar: 'me-1',
content: 'motion-safe:data-[state=open]:animate-[collapsible-down_200ms_var(--ease-out)] motion-safe:data-[state=closed]:animate-[collapsible-up_200ms_var(--ease-out)] overflow-hidden',
linkLabel: 'ms-[9px]'
}
},
{
orientation: 'vertical',
collapsed: true,
class: {
childList: 'grid px-0 py-(--menu-popup-padding)',
linkLeadingAvatar: 'shrink-0 mx-auto',
linkLabel: 'hidden',
linkLabelExternalIcon: 'hidden',
linkTrailing: 'hidden'
}
},
{
orientation: 'vertical',
collapsed: false,
class: {
link: 'data-[state=open]:-mt-(--leftmenu-group-stroke-weight) data-[state=open]:-mx-(--leftmenu-group-stroke-weight)'
}
},
{
disabled: false,
active: false,
class: {
link: 'transition-colors',
linkLeadingIcon: 'group-hover:text-(--ui-color-design-selection-content-icon)'
}
},
{
active: true,
class: {
link: 'leading-9 text-(--menu-item-color-active) bg-(--menu-item-background-active)'
}
},
{
active: true,
orientation: 'horizontal',
class: {
link: 'leading-7 menu-item-horizontal-active border-(--menu-item-border) bitrix-mobile:text-(--ui-color-base-2) bitrix-mobile:bg-transparent bitrix-mobile:border-(--ui-color-base-2)'
}
},
{
active: true,
orientation: 'vertical',
class: {
link: 'menu-item-vertical-active'
}
}
],
defaultVariants: {}
}