2

I am trying to implement react tabs in my Next.js applications. I have installed react tab packages and put the code but unfortunately, it doesn't work.

enter image description here

When I click on title 1 it doesn't move any content 1 same as clicking title2.

But the same code works in a new React application. Below is the code:

const Rtab = () => {
  return(    
    <Tabs>
      <TabList>
        <Tab>Title 1</Tab>
        <Tab>Title 2</Tab>
      </TabList>
      <TabPanel>
        <h2>Any content 1</h2>
      </TabPanel>
      <TabPanel>
        <h2>Any content 2</h2>
      </TabPanel>
    </Tabs>
  );      
}
juliomalves
  • 42,130
  • 20
  • 150
  • 146
Mir Rahat
  • 51
  • 1
  • 6

0 Answers0