Support non-wrapping scrollable tabs with proper border styling #8513
mahdi4k
started this conversation in
Feature requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Description
Currently, when
Tabs.Listcontains many tab items, they wrap to multiple lines by default. While this can be handled with CSS (flex-wrap: nowrapandoverflow-x: auto), the pseudo-element border (:before) on.mantine-Tabs-listdoesn't work correctly with horizontal scrolling.Current Behavior
When applying custom CSS to enable horizontal scrolling:
The
:beforepseudo-element border usesinset-inline-startandinset-inline-endwhich are positioned relative to the viewport/container edges, not the scrollable content. This causes the border to remain fixed while the tabs scroll horizontally.Current CSS:
Expected Behavior
When tabs overflow and scroll horizontally, the border should either:
wrap={false}orscrollablethat properly handles this scenarioProposed Solution
Add a
scrollableorwrapprop to the Tabs component that:flex-wrap: nowrapandoverflow-x: autoonTabs.ListWorkaround
Currently, developers need to override both the flex behavior and pseudo-element styling, which is not straightforward.
Use Case
This is common in applications with many tabs, such as dashboards, multi-step forms, or navigation systems where wrapping would negatively impact UX.
Beta Was this translation helpful? Give feedback.
All reactions