Vertical Tabs
See original GitHub issue- This is not a v0.x issue.
- I have searched the issues of this repository and believe that this is not a duplicate.
Expected Behavior 🤔
When orientation set to ‘vertical’ on Tabs props, tabs should display vertically
Current Behavior 😯
Tabs displayed horizontally.
Created same sample in Tabs documentation Vertical Tabs example in codesandbox link below. https://codesandbox.io/s/late-butterfly-m2r44
Code Sample from documentation
import React from "react";
import PropTypes from "prop-types";
import { makeStyles } from "@material-ui/core/styles";
import Tabs from "@material-ui/core/Tabs";
import Tab from "@material-ui/core/Tab";
import Typography from "@material-ui/core/Typography";
import Box from "@material-ui/core/Box";
function TabPanel(props) {
const { children, value, index, ...other } = props;
return (
<Typography
component="div"
role="tabpanel"
hidden={value !== index}
id={`vertical-tabpanel-${index}`}
aria-labelledby={`vertical-tab-${index}`}
{...other}
>
<Box p={3}>{children}</Box>
</Typography>
);
}
TabPanel.propTypes = {
children: PropTypes.node,
index: PropTypes.any.isRequired,
value: PropTypes.any.isRequired
};
function a11yProps(index) {
return {
id: `vertical-tab-${index}`,
"aria-controls": `vertical-tabpanel-${index}`
};
}
const useStyles = makeStyles(theme => ({
root: {
flexGrow: 1,
backgroundColor: theme.palette.background.paper,
display: "flex",
height: 224
},
tabs: {
borderRight: `1px solid ${theme.palette.divider}`
}
}));
export default function VerticalTabs() {
const classes = useStyles();
const [value, setValue] = React.useState(0);
function handleChange(event, newValue) {
setValue(newValue);
}
return (
<div className={classes.root}>
<Tabs
orientation="vertical"
variant="scrollable"
value={value}
onChange={handleChange}
aria-label="Vertical tabs example"
className={classes.tabs}
>
<Tab label="Item One" {...a11yProps(0)} />
<Tab label="Item Two" {...a11yProps(1)} />
<Tab label="Item Three" {...a11yProps(2)} />
<Tab label="Item Four" {...a11yProps(3)} />
<Tab label="Item Five" {...a11yProps(4)} />
<Tab label="Item Six" {...a11yProps(5)} />
<Tab label="Item Seven" {...a11yProps(6)} />
</Tabs>
<TabPanel value={value} index={0}>
Item One
</TabPanel>
<TabPanel value={value} index={1}>
Item Two
</TabPanel>
<TabPanel value={value} index={2}>
Item Three
</TabPanel>
<TabPanel value={value} index={3}>
Item Four
</TabPanel>
<TabPanel value={value} index={4}>
Item Five
</TabPanel>
<TabPanel value={value} index={5}>
Item Six
</TabPanel>
<TabPanel value={value} index={6}>
Item Seven
</TabPanel>
</div>
);
}
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
Vertical Tabs
A chrome extension that presents your tabs vertically. News: - Tab preview support is here! - Dark theme support is here!
Read more >How To Create Vertical Tabs - W3Schools
Tabs are perfect for single page web applications, or for web pages capable of displaying different subjects. Vertical Tabs. Click on the buttons...
Read more >How to activate vertical tabs on your favorite browser
To activate them, click the Tab Actions Menu button, which is up in the top left corner of the browser and looks like...
Read more >How to Get Vertical Tabs in Chrome - Workona
Are you looking for a way to get vertical tabs in Chrome? Our article will explain the easiest ways to organize your browser...
Read more >Vertical tabs in Firefox: Yes, it's really possible! | PCWorld
Vertical tabs are a great way to manage dozens of browser tabs in a single window. At the expense of some horizontal page...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@SerdarSanri The feature will be released in the next version, this weekend. I’m happy to see, in less than 24h, people are eager to use it.
problem is solved by updating “@material-ui/core”: “^4.7.0”, from “@material-ui/core”: “^4.3.0”,