
Research
/Security News
Contagious Interview Campaign Escalates With 67 Malicious npm Packages and New Malware Loader
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.
react-tab-component-pure-js
Advanced tools
A customizable React tab component with no built-in CSS.
A customizable React tab component with no pre-defined CSS, allowing you to style it as you see fit using classes or inline styles.
To install the component, use npm or yarn:
npm install react-tab-component-pure-js
or
yarn add react-tab-component-pure-js
Usage
Here’s a basic example of how to use the react-tab-component-pure-js in your React project:
import React, { useState } from 'react';
import { Tab } from 'react-tab-component-pure-js';
const Tab1 = () => <div>Content for Tab 1</div>;
const Tab2 = () => <div>Content for Tab 2</div>;
const App = () => {
const [currentTabIndex, setCurrentTabIndex] = useState(0);
const tabList = [
{ name: 'Tab 1', Component: Tab1 },
{ name: 'Tab 2', Component: Tab2 },
];
const handleTabClick = (index: number) => {
setCurrentTabIndex(index);
};
return (
<Tab
tabList={tabList}
currentTabIndex={currentTabIndex}
tabClickHandler={handleTabClick}
selectTabClass="selected-tab"
unselectedTabClass="unselected-tab"
tabContainerClass="tab-container"
tabOptionsClass="tab-options"
selectTabStyle={{ color: 'white', backgroundColor: 'blue' }}
unselectedTabStyle={{ color: 'gray', backgroundColor: 'lightgray' }}
tabContainerStyle={{ border: '1px solid black', padding: '10px' }}
tabOptionsStyle={{ display: 'flex', gap: '10px' }}
/>
);
};
export default App;
Here is an example of how you can style the tabs:
.tab-container {
display: flex;
flex-direction: column;
}
.tab-options {
display: flex;
border-bottom: 1px solid #ccc;
}
.selected-tab {
padding: 10px 20px;
border: 1px solid #ccc;
border-bottom: none;
cursor: pointer;
background-color: #f9f9f9;
}
.unselected-tab {
padding: 10px 20px;
cursor: pointer;
}
FAQs
A customizable React tab component with no built-in CSS.
The npm package react-tab-component-pure-js receives a total of 0 weekly downloads. As such, react-tab-component-pure-js popularity was classified as not popular.
We found that react-tab-component-pure-js demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.