Just trying to get a basic example of react-tabs working. The styling seems to be missing. The example below is in code sandbox (look in 'Hello.js'), but I see exactly the same behavior after installing the package into my project via npm. What am I missing? Thanks!
Asked
Active
Viewed 5,471 times
2
-
1side note: you can collapse all of the separate import statements to react-tabs to `import { Tabs, TabList, Tab, TabPanel } from 'react-tabs';` – Rob M. Sep 07 '17 at 21:17
-
good point, thanks – dt1000 Sep 07 '17 at 21:47
1 Answers
5
From the docs at https://github.com/reactjs/react-tabs#styling
react-tabs does not include any style loading by default. Default stylesheets are provided and can be included in your application if desired.
You will have to import the styles yourself. I don't think Code Sandbox will let you import them directly from the NPM package, so you will have to use a CDN or other source.
Besides that, the tabs are working in your example. Clicking a list item reveals different content
Here is a fork of your example with the styles added: https://codesandbox.io/s/ym7l2zk4oj

Pop-A-Stash
- 6,572
- 5
- 28
- 54