Crema React
Search…
Sidebar Configuration
In Crema, Sidebar menu has 3 different components as below .
1. Menu Group
2. Collapsible Menu
3. Menu Item
Any Navigation Menu Item that is not associated with any group of navigations and does not have its children navigations is considered to be Individual navigation(Menu Item).
The Code structure of the Sidebar(Navigation Menu) as below
1
id: 'dashboards', // Id of the Menu Group
2
title: 'Dashboards', // Title of the Menu Group
3
messageId: 'sidebar.app.dashboard', // Localization id of the Menu Group
4
type: 'group', group/collapse/item // Type of menu of the Menu Group
5
permittedRole: RoutePermittedRole.admin, // Allowed to visible User Role
6
url: '/app/my-profile' // path of the menu navigation
7
children: [] // children of the Menu Group
Copied!
In above structure we can make any type of the menu by changing the type of object. It could be a group/collapse/item.
Name
Type
Description
id
string
Id of the menu
title
string
Title of the menu
type
group
collapse
item
Type of menu of the Menu Group
permittedRole
RoutePermittedRole.admin
RoutePermittedRole.user
Allowed to visible User Role
by default it visible to all type of users
url
string
Path for the menu navigation
Copy link