patternfly / patternfly/patternfly-react
Bug - [Tabs] - [Vertical Tabs show content below tablist instead of beside]
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 862
- Forks
- 392
- Avg merge
- 4d 8h
- Merged PRs (30d)
- 9
Description
Describe the problem
When using vertical tabs, the content is rendered below the tablist.
This looks a bit strange, especially when using boxed tabs.
How do you reproduce the problem?
This behavior is shown on the Patternfly website: https://www.patternfly.org/components/tabs#vertical-tabs:
Note that the tablist fills the entire width of the demo.
So you can use the code from that example
Expected behavior
The content is displayed to the right of the tablist, as the design (especially if the tabs are boxed) indicates.
I could sort of replicate what I want by wrapping both the tablist and the content in a flexbox.
<div class="pf-v5-c-tabs pf-m-vertical pf-m-box">
<div style="display: flex;">
<ul class="pf-v5-c-tabs__list">...</ul>
<section class="pf-v5-c-tab-content">Users</section>
</div>
</div>
yields:
Is this issue blocking you?
The current workaround is to use detached tabs and place the tabs and the content in a grid and manually specifying how large each side should be.
Screenshots
If applicable, add screenshots to help explain the issue.
What is your environment?
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
What is your product and what release date are you targeting?
OS: Arch Linux
Browser: Firefox
This is a copy of the original issue https://github.com/patternfly/patternfly/issues/6117 and I moved here since I believe it fits more the ReactJS library rather than the Patternfly repo itself.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the vertical-tabs example on the PatternFly tabs page or linked CodeSandbox and inspect the Tabs implementation in this repository; the issue names no source file or test. Done means vertical boxed tabs display their content beside the tablist without the reported flexbox workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100