-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RFC] Component - MenuBar v1.0 #43
Comments
Can we have all the props as in https://ant.design/components/menu/ ? |
Instead it should be
Reason is that, if it is a children the composition would change for dropdown in smaller screens. You might have to use ul li to manage the list. Whereas in the second option when |
Chakra MenuList is always being rendered in Popover so
|
Our menu is different from their menu. Ours is a kind of nav component that creates a list of navitems. Our nav item can be a Chakra Menu (or) a simple navigatable ul li's. For now we can use their chakra menu to be our nav item in case if our submenu is of type dropdown. |
modification is required. have to put a condition whether the return will be popover MenuList or Collapsable MenuList |
Collapsible is not a case for desktop screen. Lets make a desktop version where there can be just two types.
By nav item I mean once clicked can navigate you through a route. It will have onActionProp. |
NavItem is just a container that can receive children like Link, string, button, icon, menu or any other composition. |
ok, for desktop it is not needed. But for mobile it will be needed. Ignore for it now. |
Desktop version can also have a collapsible menu type. We should think about the use case like this:
|
@sandeepprabhakaran In that case we would be having to write two different children, one for responsive and another for desktop ? |
Can you explain why that's required? Pretty much every Navitem will be collapsed on responsive, only that there can be two levels. So in that sense we know which Menus will go one level deep or two level deep. Right? |
I will explain the case clearly. The ideal way that we are looking is to have a desktop version something like this The Code would look like
To achieve the same thing with chakra Menu as a NavItem, the code would be looking like
On Desktop screen [Works fine] On Mobile screen (Issue: Cannot collapse since it is always a dropdown using popover) So to avoid this issue either NavItem should be rendering Chakra's menu at desktop screen and a simple collapsible list at mobile screen. (or) Compose with two different components when using it in the app. |
Just like this We can have our Link component with NavItem since it will be a Box Components right? I think it's best to compose our own submenu component to tackle the responsiveness. |
Note- Updated the Description Pending Features
|
Base Component to build an application Navbar, sidebar and Mobile Menu
The Goal:
Create a MenuBar as a navigation component that is composable, extensible and accessible using Chakra UI.
Key Resources:
Key Features:
Import
MenuBar
: The wrapper component that provides context, state, and focusmanagement.
MenuBarItem
: Items of the MenuBar which are the direct children ofMenuBar
SubMenu
: The wrapper component that provides context, state, and focusmanagement for
SubMenu
components.SubMenuTitle
: The trigger for theSubMenuList
. Must be a direct child ofSubMenu
.SubMenuList
: The wrapper for theSubMenu
items. Must be a direct child ofSubMenu
.SubMenuListArrow
: A visual arrow that points to the reference (or trigger).SubMenuItem
: The trigger that handles submenu selection. Must be a direct child of aSubMenuList
.SubMenuGroup
: A wrapper to group related submenu items.SubMenuDivider
: A visual separator for submenu items and groups.SubMenuOptionGroup
: A wrapper for checkable menu items (radio and checkbox)SubMenuItemOption
: The checkable menu item, to be used with MenuOptionGroupUsage
The text was updated successfully, but these errors were encountered: