Security News
New Python Packaging Proposal Aims to Solve Phantom Dependency Problem with SBOMs
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
react-tabs-component
Advanced tools
Provides tabs for React with a very clean API.
This JSX:
var Tabs=require('react-tabs-component');
<Tabs
defaultTabNum={1}
tabNames={['Tab A','Tab B','Tab C']}
classPrefix='tabs-'
>
<section>Tab A Content</section>
<section>Tab B Content</section>
<section>Tab C Content</section>
</Tabs>
renders this HTML:
<div>
<nav class="tabs-tab-container">
<span class="tabs-tab" data-tabnum="0">Tab A</span>
<span class="tabs-tab tabs-active-tab" data-tabnum="1">Tab B</span>
<span class="tabs-tab" data-tabnum="2">Tab C</span>
</nav>
<section>Tab B Content</section>
</div>
In the example above, only the content for Tab B displays, since Tab B is the active tab.
tabNames
—array of strings or components that will display in each tab.TabNames
. For example, if the first tab is active, then the first child of the Tabs component will display.classPrefix
—a string to add to the beginning of each CSS class used internally by the Tabs component. The default is the empty string (''
), so if this prop isn't specified, then class names will be used as in the example below:JSX:
var Tabs=require('react-tabs-component');
<Tabs
defaultTabNum={1}
tabNames={['Tab A','Tab B','Tab C']}
>
<section>Tab A Content</section>
<section>Tab B Content</section>
<section>Tab C Content</section>
</Tabs>
HTML:
<div>
<nav class="tab-container">
<span class="tab" data-tabnum="0">Tab A</span>
<span class="tab active-tab" data-tabnum="1">Tab B</span>
<span class="tab" data-tabnum="2">Tab C</span>
</nav>
<section>Tab B Content</section>
</div>
willChange
—fires before the tab changes.didChange
—fires after the tab changes.In the example below, clicking Tab C
will produce the following results:
Tab B Content
un-renders and Tab C Content
is rendered.JSX:
var willChange=function(newTabNum,oldTabNum){
console.log('will change tabs from '+newTabNum+' to '+oldTabNum);
};
var didChange=function(newTabNum,oldTabNum){
console.log('changed tabs from '+newTabNum+' to '+oldTabNum);
};
<Tabs
defaultTabNum={1}
tabNames={['Tab A','Tab B','Tab C']}
classPrefix='tabs-'
>
<section>Tab A Content</section>
<section>Tab B Content</section>
<section>Tab C Content</section>
</Tabs>
FAQs
Tabs Component for React with the simplest API
The npm package react-tabs-component receives a total of 7 weekly downloads. As such, react-tabs-component popularity was classified as not popular.
We found that react-tabs-component demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
Security News
Socket CEO Feross Aboukhadijeh discusses open source security challenges, including zero-day attacks and supply chain risks, on the Cyber Security Council podcast.
Security News
Research
Socket researchers uncover how threat actors weaponize Out-of-Band Application Security Testing (OAST) techniques across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.