How to hide tabs on small screens?
P粉520204081
2023-08-17 12:53:57
<p>I have an antd menu with labels and icons.
This is the minimal representation of the design.
Codesandbox</p>
<p>Now what I want is to hide the label and only show the icon when the menu starts showing ellipses. Since I'm not very familiar with CSS, I was wondering if this functionality could be achieved via antd. </p>
You need to use media queries and set the tag to display none below a specific size.
I personally recommend you to use the above (it is the most common way to switch between desktop and mobile devices)
Finally, consider using justify-content: center to center menu items on mobile devices :)