{"id":39487634,"url":"https://github.com/vtex-apps/menu","last_synced_at":"2026-01-18T05:28:45.468Z","repository":{"id":33794600,"uuid":"131058388","full_name":"vtex-apps/menu","owner":"vtex-apps","description":"VTEX Menu app ","archived":false,"fork":false,"pushed_at":"2024-11-22T13:51:06.000Z","size":1264,"stargazers_count":7,"open_issues_count":18,"forks_count":24,"subscribers_count":55,"default_branch":"master","last_synced_at":"2024-11-22T14:37:20.455Z","etag":null,"topics":["hacktoberfest","srv-store-framework","store-framework","vtex-io","xp-developer"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vtex-apps.png","metadata":{"files":{"readme":"docs/README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-04-25T20:13:10.000Z","updated_at":"2022-11-16T22:49:46.000Z","dependencies_parsed_at":"2024-11-27T06:16:01.120Z","dependency_job_id":null,"html_url":"https://github.com/vtex-apps/menu","commit_stats":null,"previous_names":[],"tags_count":118,"template":false,"template_full_name":null,"purl":"pkg:github/vtex-apps/menu","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vtex-apps%2Fmenu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vtex-apps%2Fmenu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vtex-apps%2Fmenu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vtex-apps%2Fmenu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vtex-apps","download_url":"https://codeload.github.com/vtex-apps/menu/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vtex-apps%2Fmenu/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28530817,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T00:39:45.795Z","status":"online","status_checked_at":"2026-01-18T02:00:07.578Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","srv-store-framework","store-framework","vtex-io","xp-developer"],"created_at":"2026-01-18T05:28:45.401Z","updated_at":"2026-01-18T05:28:45.456Z","avatar_url":"https://github.com/vtex-apps.png","language":"TypeScript","readme":"📢 Don't fork this project. Use, contribute, or open issues through [Store Discussion](https://github.com/vtex-apps/store-discussion).\n\n# Menu\n\n\u003c!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section --\u003e\n\n[![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)](#contributors)\n\n\u003c!-- ALL-CONTRIBUTORS-BADGE:END --\u003e\n\nThe Menu component displays a navigation bar with links and dropdown submenus. It can be configured to display internal or external links and supports both category-based and custom menu items.\n\n![menu-app](https://cdn.jsdelivr.net/gh/vtexdocs/dev-portal-content@main/images/vtex-menu-0.png)\n\n## Configuration\n\n1. Add the app to the store theme dependencies in the `manifest.json` file.\n\n```json\n  \"dependencies\": {\n    \"vtex.menu\": \"2.x\"\n  }\n```\n\n2. Add the `vtex.menu@2.x:menu` block to the [store header](https://github.com/vtex-apps/store-header/blob/master/store/interfaces.json) template.\n\n3. Configure the `menu-item` blocks to build the store menu options. These can be declared in two ways in `vtex.menu@2.x:menu`: as children or as props. The advantage of the second type of `menu-item` configuration is that Site Editor can be used to edit the blocks.\n\n### `menu-item` as children\n\n_Example:_\n\n```json\n\"vtex.menu@2.x:menu#websites\": {\n  \"children\": [\n    \"menu-item#shop\",\n    \"menu-item#about-us\"\n  ]\n},\n\"menu-item#shop\": {\n  \"props\": {\n    \"id\": \"menu-item-shop\",\n    \"type\": \"custom\",\n    \"highlight\": false,\n    \"itemProps\": {\n      \"type\": \"internal\",\n      \"href\": \"#\",\n      \"noFollow\": false,\n      \"tagTitle\": \"Shop\",\n      \"text\": \"Shop\"\n    },\n    \"iconProps\": {\n      \"id\": \"bnd-logo\",\n      \"size\": 16,\n      \"viewBox\": \"0 0 16 16\",\n      \"activeClassName\": \"rebel-pink\",\n      \"mutedClassName\": \"c-action-primary\"\n    },\n    \"iconToTheRight\": true\n  }\n}\n```\n\n### `menu-item` as props\n\n_Example:_\n\n```json\n\"vtex.menu@2.x:menu#websites\": {\n  \"props\": {\n    \"items\": [\n      {\n        \"id\": \"menu-item-shop\",\n        \"type\": \"custom\",\n        \"highlight\": false,\n        \"itemProps\": {\n          \"type\": \"internal\",\n          \"href\": \"#\",\n          \"noFollow\": false,\n          \"tagTitle\": \"Shop\",\n          \"text\": \"Shop\"\n        }\n      },\n      {\n        \"id\": \"menu-item-about-us\",\n        \"type\": \"custom\",\n        \"highlight\": false,\n        \"itemProps\": {\n          \"type\": \"internal\",\n          \"href\": \"/about-us\",\n          \"noFollow\": false,\n          \"tagTitle\": \"about-us\",\n          \"text\": \"About Us\"\n        }\n      }\n    ]\n  }\n}\n```\n\n### Adding a submenu \n\nYou can define a submenu by adding the `submenu` block to a `menu-item`:\n\n```jsonc\n\"menu-item#shop\": {\n  \"props\": {\n    \"type\": \"custom\",\n    \"highlight\": false,\n    \"itemProps\": {\n      \"type\": \"internal\",\n      \"href\": \"#\",\n      \"noFollow\": false,\n      \"tagTitle\": \"Shop\",\n      \"text\": \"Shop\"\n    },\n  },\n  \"blocks\": [\"vtex.menu@2.x:submenu#shop\"] // Defining a submenu\n},\n\"vtex.menu@2.x:submenu#shop\": {\n  \"children\": [\n    \"vtex.menu@2.x:menu#submenushop\"\n  ]\n},\n\"vtex.menu@2.x:menu#submenushop\": {\n  \"children\": [\n    \"menu-item#shop\"\n  ]\n}\n```\n\n\u003eℹ️ The Menu block doesn't require any specific child blocks to work\n\n## `menu-item` props\n\nThe available `menu-item` block props are:\n\n| Prop name         | Type                           | Description                                                                                                                                                                                                                                                           | Default value |\n| ----------------- | ------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- |\n| `type`            | `string`                       | Menu item type, either `category` or `custom`                                                                                                                                                                                                                         | `category`    |\n| `id`              | `string`                       | Menu item ID                                                                                                                                                                                                                                                          | `undefined`   |\n| `highlight`       | `boolean`                      | Indicates whether the item has a highlight                                                                                                                                                                                                                                      | `undefined`   |\n| `iconPosition`    | `string`                       | Icon position relative to the menu item text, either to the `left` or `right`                                                                                                                                                                                        | `left`        |\n| `iconProps`       | `IconProps`                    | Icon props                                                                                                                                                                                                                                                            | `undefined`   |\n| `onMountBehavior` | `enum`                         | Indicates whether the submenu should always be automatically displayed when its parent is hovered/clicked on (`open`) or (`close`)                                                                                                                                             | `closed`      |\n| `itemProps`       | `CategoryItem` or `CustomItem` | Item props                                                                                                                                                                                                                                                            | `undefined`   |\n| `blockClass`         | `CustomCSSClasses`             | Used to override default CSS handles. To learn how this prop works, check this description of [useCustomClasses](https://github.com/vtex-apps/css-handles#usecustomclasses). Please note that this is only useful when importing this block as a React component. | `undefined`   |\n\n### Icon props\n\n| Prop name         | Type      | Description                             | Default value |\n| ----------------- | --------- | --------------------------------------- | ------------- |\n| `id`              | `string`  | Icon ID                                 | N/A           |\n| `isActive`        | `boolean` | Indicates if the item is active       | `true`        |\n| `size`            | `number`  | Icon size                               | 16            |\n| `viewBox`         | `string`  | Icon view box                           | `0 0 16 16`   |\n| `activeClassName` | `string`  | Icon classname when `isActive` is true  | N/A           |\n| `mutedClassName`  | `string`  | Icon classname when `isActive` is false | N/A           |\n\n### Category-specific props\n\n| Prop name    | Type     | Description      | Default value |\n| ------------ | -------- | ---------------- | ------------- |\n| `categoryId` | `number` | Item category ID | N/A           |\n| `text`       | `string` | Menu item text   | N/A           |\n\n### Custom item props\n\n| Prop name  | Type      | Description                                     | Default value |\n| ---------- | --------- | ----------------------------------------------- | ------------- |\n| `type`     | `string`  | Menu item type, either `internal` or `external` | `internal`    |\n| `href`     | `string`  | Link to the menu item destination               | N/A           |\n| `noFollow` | `boolean` | No follow attribute                             | N/A           |\n| `tagTitle` | `string`  | Menu item tag                                   | N/A           |\n| `text`     | `string`  | Menu item text                                  | N/A           |\n\n## Customization\n\nTo apply CSS customizations to this and other blocks, please follow the instructions in [Using CSS Handles for store customization](https://developers.vtex.com/docs/guides/vtex-io-documentation-using-css-handles-for-store-customization).\n\n| CSS Handle                 |\n| -------------------------- |\n| `accordionIcon--isClosed`  |\n| `accordionIcon--isOpen`    |\n| `accordionIcon`            |\n| `container`                |\n| `linkLeft`                 |\n| `linkMiddle`               |\n| `linkRight`                |\n| `menuContainerNav`         |\n| `menuContainer`            |\n| `menuItemInnerDiv`         |\n| `menuItem`                 |\n| `menuItem--isOpen`         |\n| `menuItem--isClosed`       |\n| `menuLinkDivLeft`          |\n| `menuLinkDivMiddle`        |\n| `menuLinkDivRight`         |\n| `menuLinkNav`              |\n| `renderLink`               |\n| `styledLinkContainer`      |\n| `styledLinkContent`        |\n| `styledLinkIcon`           |\n| `styledLink`               |\n| `submenuAccordion`         |\n| `submenuColumn`            |\n| `submenuContainer`         |\n| `submenuWrapper--isClosed` |\n| `submenuWrapper--isOpen`   |\n| `submenuWrapper`           |\n| `submenu`                  |\n\n## Contributors\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore --\u003e\n\u003ctable\u003e\u003ctr\u003e\u003ctd align=\"center\"\u003e\u003ca href=\"http://giovanapereira.com.br/\"\u003e\u003cimg src=\"https://avatars3.githubusercontent.com/u/26018620?v=4\" width=\"100px;\" alt=\"Giovana Pereira\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eGiovana Pereira\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/vtex-apps/menu/commits?author=giovanapereira\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\u003c/tr\u003e\u003c/table\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind are welcome!\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvtex-apps%2Fmenu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvtex-apps%2Fmenu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvtex-apps%2Fmenu/lists"}