Documentation
Feedback
Guides
VTEX IO Apps

VTEX IO Apps
Advanced components
Category Menu
Official extension
Version: 2.18.1
Latest version: 2.18.1

{"base64":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABCAIAAAB2XpiaAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAFUlEQVR4nGPg4+Mz1Nfjl1L8f2MmAAz0A3OFonzpAAAAAElFTkSuQmCC","img":{"src":"https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square","width":110,"height":20,"type":"svg"}}

The Category Menu is a store component that displays a list of departments in a configurable menu layout. It helps organize and present categories and subcategories to improve navigation.

An error occurred while loading the image https://cdn.jsdelivr.net/gh/vtexdocs/dev-portal-content@main/docs/vtex-menu-0.png

Configuration

  1. Add the app to your store theme's dependencies in the manifest.json.

_10
dependencies: {
_10
"vtex.category-menu": "2.x"
_10
}

  1. Add the category-menu block to your store theme.

_11
{
_11
"category-menu": {
_11
"props": {
_11
"showAllDepartments": true,
_11
"showSubcategories": true,
_11
"menuDisposition": "center",
_11
"departments": [],
_11
"sortSubcategories": "name"
_11
}
_11
}
_11
}

category-menu props

Prop nameTypeDescriptionDefault Value
showAllDepartmentsBooleanShows all department categories in the menutrue
menuDispositionEnumIndicates the menu's position on the screen. Possible values: left, center, rightcenter
showSubcategoriesBooleanDefines if the subcategories will be displayedtrue
departmentsArray(items)List of department items to be displayed on the menu[]
mobileModeBooleanRenders the category menu in a sidebar if set to truefalse
sortSubcategoriesEnumDetermines how subcategories are sorted. Possible value: name

category-menu items

Prop nameTypeDescription
idNumberThe department ID to be displayed on the menu

Customization

In order to apply CSS customizations in this and other blocks, follow the instructions on Using CSS Handles for store customization.

CSS Handles
container
departmentLink
departmentList
firstLevelLink
firstLevelLinkContainer
firstLevelList
itemContainer
itemContainer--category
itemContainer--department
menuContainer
secondLevelLink
secondLevelLinkContainer
secondLevelList
section--category
section--department
sidebar
sidebarContainer
sidebarContent
sidebarHeader
sidebarItem
sidebarItemContainer
sidebarOpen
sidebarScrim
submenuItem
submenuList
See also
VTEX App Store
VTEX IO Apps