Try to create a Tabs
component with the centered
property, and then attempt to scroll horizontally.
We expect the horizontal scroll for navigating between tabs to work properly even when using the centered
property to center the Tabs Nav List.
Our website uses the Antd Tabs component with the centered
property to center the Tabs Nav List on our page. However, we've noticed that the horizontal scroll for navigating between tabs is not working as expected. This is likely because the centered property centers the content using justify-content: center
, while the scroll to navigate between tabs is implemented using transform: translate(Xpx, Xpx). This is causing issues, since both justify-content: center
and transform: translate
are likely conflicting with each other.
Environment | Info |
---|---|
antd | 5.3.3 |
React | 17.0.2 |
System | Ubuntu 22.04.2 |
Browser | Google Chrome 111.0.5563.64 |
Using margin: 0 auto
instead of justify-content: center
to center the Tabs Nav List can potentially resolve the issue with the scroll.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too