[Design System, ui] Vertical tabs or Menus? #194
Replies: 3 comments 6 replies
-
I will provide a more detailed answer later, but for now, I just wanted to point out that we briefly discussed this very use case when working on the menu, and this the reason we ended up with both a I need to think about this some more but I think in general terms we need to chose between two approaches: |
Beta Was this translation helpful? Give feedback.
-
Same here. I'll also need some time to really be able to say something sensible. One thing that immediately comes to mind is the intended usecases for both the tabs and the menu (and especially the vertically oriented variants). What are they supposed to be used for? For me that's where I'd start with figuring out whether the components are actually different, and if they are if the differences are cosmetic or functional. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the initial thoughts, I can add some information regarding usecases:
The use cases for the components are:
Based on the use cases above, I think there is a reasonable argument for "all of the above" being available in |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Background
There is a proposal to add a vertical variant to the
Tab
ui
component. A discussion opened up that suggested using existingMenuItem
/Menu
components to achieve the functionality that verticalTab
s would provide.Providing a vertical tab/sidebar solution is currently blocking features that are planned for 2.36 release.
Why vertical tabs?
The proposal of vertical tabs was intended to provide the following functionality:
An example of vertical tab usage that led to this proposal:

Using
MenuItem
s insteadThis functionality could indeed be provided by the
MenuItem
andMenu
component, but with some adjustments to allow for sidebar functionality. These adjustments are outlined in this document.Currently, the
MenuItem
andMenu
component is designed specifically with aDropdownMenu
in mind. The Menu component in the Design System only describes it's use as a dropdown menu. UsingMenuItem
s for a sidebar-type component is possible, but not fully supported.Dropdown
MenuItem
s and SidebarMenuItem
sThe requirements of a
MenuItem
are similar, but not identical, for a sidebar and a dropdown menu:Sidebar menu items
- Enabled
- Hover
- Focus
- Active (click)
- Disabled
- Selected
- Expanded/Collapsed
- Display icon
- Dense option
Dropdown menu items
- Enabled
- Hover
- Focus
- Active (click)
- Disabled
- Toggled
- Open (child menu open from this item)
- Display icon
- Dense option
A visual comparison of the states required by a
MenuItem
in these two different use cases:(Styles are for illustration only and are not the final styles for sidebar menu items)
Requirements of a dual-usage
MenuItem
To support the dual-usage, a
MenuItem
needs to provide the following states, with clear differentiation between each:A
MenuItem
that satisfies the above requirements would then be composed for the different use cases, as follows:Component:
DropdownMenu
DropdownContainer
and multipleMenuItem
sComponent:
SidebarMenu
SidebarContainer
and multipleMenuItem
sWork required
To use a
MenuItem
for the dual-purpose of a dropdown and sidebar type menu, the following changes are needed:MenuItem
s with descendants in aSidebarMenu
MenuItem
s (used only inSidebarMenu
)SidebarMenu
container componentDiscussion
toggled
for dropdown,selected
for sidebar).Tabs
only? ASidebarMenu
makes sense for the main page layout, but should it be used inside a page too?Beta Was this translation helpful? Give feedback.
All reactions