
Security News
CVE Volume Surges Past 48,000 in 2025 as WordPress Plugin Ecosystem Drives Growth
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.
A simple tabs component. Mainly a wrapper for react-tabs.
$ yarn add --save ndla-tabs
$ npm install ndla-tabs --save
/* Your project's main .scss import file */
@import '~ndla-tabs/scss/tabs'; // with webpack and sass-loader
@import '../path/to/node_modules/ndla-tabs/scss/tabs'; // direct reference
import Tabs from 'ndla-tabs';
import BananaComponent from 'banana';
import PickleComponent from 'picke';
const Fruits = () => {
const fruitTabs = [
{ title: 'Apple', content: <p>An apple a day keeps the doctor away</p> },
{ title: 'Orange', content: () => <h1>Orange is the new black</h1> },
{ title: 'Banana', content: <BananaComponent /> },
{ title: 'Pickle', content: <PickleComponent />, disabled: true }, // No vegetables allowed!
];
return <Tabs tabs={fruitTabs} />;
};
selectedIndex propimport Tabs from 'ndla-tabs';
import fruitTabs from 'fruit-tabs';
class FruitTabSelector extends Component {
constructor(props) {
super(props);
this.state = {
index: 0,
};
}
render() {
const { index } = this.state;
return (
<div>
<button onClick={() => this.setState({ index: 1 })}>
Show banana tab
</button>
<Tabs selectedIndex={index} tabs={fruitTabs} />
</div>
);
}
}
| Props | Type | Required | Description |
|---|---|---|---|
| tabs | array | * | An array of tabs represented as objects. An tab object requires the following properties: title, content. Property disabled is optional. |
| onSelect | func | Is called when a tab is selected. Current index and last index will be passed as parameters. | |
| selectedIndex | object | Is the tab to select when rendered. Used when you want to control which tab is rendered from the a parent component. | |
| forceRenderTabPanel | bool | Is false by default. Set to true to render all tab's content instead of only selected tab content. | |
| modifier | string | An BEM modifier which is added to all html classes. |
resetIdCounter should be called on server before render to prevent server and client markup diff. Example:
import { resetIdCounter } from 'ndla-tabs';
resetIdCounter();
ReactDOMServer.renderToString(...);
FAQs
React Tabs component for NDLA
The npm package ndla-tabs receives a total of 4 weekly downloads. As such, ndla-tabs popularity was classified as not popular.
We found that ndla-tabs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.