import Tab from 'react-bootstrap/Tab'; import Tabs from 'react-bootstrap/Tabs'; import Sonnet from '../../components/Sonnet'; function UncontrolledExample() { return ( <Tabs defaultActiveKey="profile" id="uncontrolled-tab-example" className="mb-3" > <Tab eventKey="home" title="Home"> </Tab> <Tab eventKey="profile" title="Profile"> </Tab> <Tab eventKey="contact" title="Contact" disabled> </Tab> </Tabs> ); } export default UncontrolledExample;
ul.mb-3.nav.nav-tabs { overflow-y: hidden; overflow-x: scroll; max-width: 40%; }
import Tab from 'react-bootstrap/Tab'; import Tabs from 'react-bootstrap/Tabs'; import Sonnet from '../../components/Sonnet'; function UncontrolledExample() { return ( <Tabs defaultActiveKey="profile" id="uncontrolled-tab-example" className="mb-3" > <Tab eventKey="home" title="Home"> </Tab> <Tab eventKey="profile" title="Profile"> </Tab> <Tab eventKey="contact" title="Contact" disabled> </Tab> </Tabs> ); } export default UncontrolledExample;
I am using react-bootstrap/Tabs for dynamic Tabs with content. If Tabs are more than 6, then my requirement is to add horizontal scroll. Tried adding :
overflow-x: scroll;
overflow-y: hidden;
It is adding a empty horizontal scrollbar.
to get horizontal scrollbar for tabs.
I am using this
Tabcontainer and navs as Tab
give style to Navs tag
overflow:'auto', display:'flex, flex-wrap:nowrap