I’ve set up a sandbox to show what I’m trying to do, but essentially I want to get the content of the tabs to scroll when needed and otherwise for the tab to fill to the bottom, I’m sure the trick will be to use flex columns, but nothing i’m trying seems to work
https://codesandbox.io/p/sandbox/primevue-demo-forked-ww2zq7?file=/src/App.vue:111,25
2
Answers
Solution
You only need to override the CSS formatting of a few PrimeVue classes, I’ll show you an example using a CDN.
Header to left side
To add a bit of dynamism, I created a
.vertical-header
class. If you associate this with theTabPanel
, the header will automatically become vertical on the left side.Header to right side
Using the same technique, it could also be dynamically positioned on the right side (using flex-row-reverse and replacing the right border with the left border).
Example
The
TabView
automatically handles the content height in PrimeVue, so you need to set the entireTabView
container to a fixed size. After this, it’s advisable to align thenav-container
fixed to the top using CSS.