
Security News
OWASP 2025 Top 10 Adds Software Supply Chain Failures, Ranked Top Community Concern
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.
@simpozio/nav-menu
Advanced tools
React component for navigation menu.
npm i @simpozio/terminal-text
import {Menu, Logo, Nav, Action, Social} from '@simpozio/nav-menu';
import {Link} from 'react-router-dom';
import LogoImg from './logo.svg';
const Component = () => {
return (
<Menu>
<Logo>
{/* you can pass your own children */}
<LogoImg />
</Logo>
<Nav>
{/* you can pass your own children */}
<Link to="/">Home</Link>
<Link to="/about">About</Link>
<Link to="/products">Products</Link>
<Link to="/contacts">Contacts</Link>
</Nav>
<Social>
{/* you can pass your own children */}
<a href="https://facebook.com" rel="noreferrer,nofollow" target="_blank">Facebook</a>
<a href="https://instagram.com" rel="noreferrer,nofollow" target="_blank">Instagram</a>
</Social>
<Action>
{/* you can pass your own children */}
<button>Some Action</button>
</Action>
</Menu>
)
}
import React, {useRef} from 'react';
import {Menu, Logo, Nav, Action, Social} from '@simpozio/nav-menu';
const Component = () => {
const menuRef = useRef();
const handleClick = () => {
const {isOpen, setOpen} = menuRef.current;
setOpen(!isOpen);
}
return (
<>
<button onClick={handleClick}>
<Menu ref={menuRef} >
{/* ... */}
</Menu>
</>
)
}
isMobile: boolean - applying mobile state to menuisNarrow: boolean - applying narrow state to menuimport React, {useEffect, useState} from 'react';
import {Menu, Logo, Nav, Action, Social} from '@simpozio/nav-menu';
const Component = () => {
const [isMobile, setMobile] = useState(window.innerWidth < 768);
const [isScrolling, setScrolling] = useState(window.pageYOffset > 0);
useEffect(() => {
const handleResize = () => setMobile(window.innerWidth < 768);
window.addEventListener('resize', handleResize);
window.addEventListener('orientationchange', handleResize);
return () => {
window.removeEventListener('resize', handleResize);
window.removeEventListener('orientationchange', handleResize);
}
}, [isMobile])
useEffect(() => {
const handleScroll = () => setScrolling(window.pageYOffset > 0);
window.addEventListener('scroll', handleScroll);
return () => window.removeEventListener('scroll', handleScroll);
}, [isScrolling])
return (
<>
<button onClick={handleClick}>
<Menu
isMobile={isMobile}
isNarrow={isScrolling}
>
{/* ... */}
</Menu>
</>
)
}
You can pass all styles as styles prop to Menu component.
In your mixin you can use props, passed to Menu styled component:
isOpen: boolean - is menu open
isNarrow: boolean - is menu in narrow state
isMobile: boolean - is menu in mobile state
Toggle - reference to Toggle component
Mobile - reference to Mobile wrapper
Logo - reference to Logo component
Nav - reference to Nav component
Social - reference to Social component
Action - reference to Action component
import {Menu, Logo, Nav, Action, Social} from '@simpozio/nav-menu';
import {css} from 'styled-components';
const styles = {
// menu styles
height: 2rem;
// used Logo reference
${props => props.Logo} {
width: 3rem;
height: 1rem;
}
// used isMobile prop
${props => props.isMobile
? `padding: 5px;`
: `padding: 10px;`}
}
const Component = () => {
return (
<Menu styles={styles}>
<Logo>
{/* ... */}
</Logo>
<Nav>
{/* ... */}
</Nav>
<Social>
{/* ... */}
</Social>
<Action>
{/* ... */}
</Action>
</Menu>
)
}
or you can pass styles to all components separately
import {Menu, Logo, Nav, Action, Social} from '@simpozio/nav-menu';
import {css} from 'styled-components';
const menuStyles = css`
height: 2rem;
${props => props.isMobile
? `padding: 5px;`
: `padding: 10px;`}
`;
const logoStyles = css`
margin-right: 20px;
`;
const navStyles = css`
margin-left: 20px;
`;
const actionStyles = css`
color: red;
`;
const socialStyles = css`
text-decoration: underline;
`;
const Component = () => {
return (
<Menu styles={menuStyles}>
<Logo styles={logoStyles}>
{/* ... */}
</Logo>
<Nav styles={navStyles}>
{/* ... */}
</Nav>
<Social styles={socialStyles}>
{/* ... */}
</Social>
<Action styles={actionStyles}>
{/* ... */}
</Action>
</Menu>
)
}
FAQs
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
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.