-
Hi, I'm trying to use the Modal along with the vertical borderless tabs to create a user settings modal for Design Review. The trouble I'm running into is that the tabs are not responsive to the width of their container. When the window or modal gets too small, the text cuts off completely. I'm also not able to size the modal the way I want - in this case, 70% view height, 37.5% view width, 24 or 32 px padding. I can fix the styling the way I want by overriding these classes, but we are wanting to avoid doing that if possible. Is there a best way to style tabs and modals the way you want without overriding the css? Or is it just a given that for these components to be completely customizable you'll have to do some overriding? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
I could not really reproduce this. With correct usage, the tab labels look fine on a narrow screen (without any custom styling). But also, if your labels are long, I don't think VerticalTabs is even the right component choice for narrow screens. Maybe you could switch to HorizontalTabs and add horizontal scrolling (although that's tricky to do because of the visible scrollbar). Or maybe you could use VerticalTabs with shorter labels or only icons with tooltips.
You should not really have to modify the padding on Modal. And most of the sizing needs can be handled just by styling your content. Is there a reason you want to use those specific values?
The expected way to add custom styles to most of our components is by using There is a bug in Modal where Hope that helps. |
Beta Was this translation helpful? Give feedback.
I could not really reproduce this. With correct usage, the tab labels look fine on a narrow screen (without any custom styling).
But also, if your labels are long, I don't think VerticalTabs is even the right component choice for narrow screens. Maybe you could switch to HorizontalTabs and add horizontal scrolling (although that's tricky to do because of the visible scrollbar). Or maybe you could use VerticalTabs with shorter labels or only icons with tooltips.