
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.
@scripty/react-header
Advanced tools
lightweight react header component. It has full working flyout navigation, user menu and breadcrumbs with appropriate highlighting. Install and enjoy applying your styles to the header.
lightweight react header component. It has full working flyout navigation, user menu and breadcrumbs with appropriate highlighting. Install and enjoy applying your styles to the header.
npm install -s @scripty/react-header
import React, { useState } from 'react';
import { BrowserRouter as Router } from 'react-router-dom';
import { Header } from '@scripty/react-header';
export const Example = () => {
const [ selectedKeys, setSelectedKeys ] = useState([])
const onClick = (key, selectedKeys) => {
setSelectedKeys(selectedKeys);
}
const routes = [
{
"key" : "Dashboard",
"label" : "Dashboard",
"icon" : "DashboardOutlined",
"path" : "/",
"exact" : true
},
{
"key" : "Example",
"label" : "Example",
"icon" : "BankOutlined",
"path" : "/example",
"submenu" : [
{
"key" : "Sub-1",
"label" : "Sub 1",
"path" : "/sub1",
"icon" : "CloudServerOutlined",
"submenu" : [
{
"key" : "Sub-1-1",
"label" : "Sub-1-1",
"path" : "/sub-1-1",
"icon" : "CreditCardFilled",
}
]
}
]
}
];
const userMenuRoutes = [
{
"key" : "UserMenu",
"label" : "Login",
"path" : "/login",
"exact" : true,
"submenu" : [
{
"key" : "Profile",
"label" : "Profile",
"path" : "/profile",
"icon" : "UserOutlined",
},
{
"key" : "Settings",
"label" : "Settings",
"path" : "/settings",
"icon" : "SettingOutlined",
}
]
}
];
const loggedOutUserMenuRoute = [
{
"key" : "UserMenu",
"label" : "Login",
"path" : "/login",
"exact" : true
}
];
const loggedInUser = {
username: 'Danijel',
loggedIn: true,
avatar: {
url: 'https://s.gravatar.com/avatar/d363403799aa4b4de34c36bc290ebe12?size=50&default=retro'
}
};
const loggedOutUser = {
loggedIn: false,
};
return (
<Router>
<h2>Fullpage Header</h2>
<Header
routes={routes}
userMenuRoutes={userMenuRoutes}
user={loggedInUser}
selectedKeys={selectedKeys}
onClick={onClick}
showBreadcrumbs={true}
logo={'Awsome Logo'}
/>
<br /><br /><br /><br /><br />
<h2>Sized Header</h2>
<Header
routes={routes}
userMenuRoutes={userMenuRoutes}
user={loggedInUser}
selectedKeys={selectedKeys}
onClick={onClick}
layout={'sized'}
showBreadcrumbs={true}
logo={<div>Your Logo</div>}
/>
<br /><br /><br /><br /><br />
<h2>Sized Header without Breadcrumbs</h2>
<Header
routes={routes}
userMenuRoutes={loggedOutUserMenuRoute}
user={loggedOutUser}
selectedKeys={selectedKeys}
onClick={onClick}
layout={'sized'}
logo={'Logo'}
/>
</Router>
);
};
Name | Description |
---|---|
Header | Header with 3 Level Flyout Navigation and usermenu |
Property | Type | Default |
---|---|---|
onClick | Function | () => {} |
routes | Array | [] |
userMenuRoutes | Array | [] |
selectedKeys | Array | [] |
user | Object | { loggedIn: false } |
layout | Array | fullpage |
showBreadcrumbs | Boolean | false |
logo | React.Component or String | Logo |
Property | Type | Description |
---|---|---|
key | String | unique id key (required) |
label | String | (required) |
path | String | (required) |
icon | String | (optional) |
FAQs
lightweight react header component. It has full working flyout navigation, user menu and breadcrumbs with appropriate highlighting. Install and enjoy applying your styles to the header.
The npm package @scripty/react-header receives a total of 4 weekly downloads. As such, @scripty/react-header popularity was classified as not popular.
We found that @scripty/react-header 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.
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.