
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
@pras-ui/menu
Advanced tools
> A low-level, headless component for building accessible menus and submenus. This package handles state management, keyboard interactions, and accessibility.
A low-level, headless component for building accessible menus and submenus. This package handles state management, keyboard interactions, and accessibility.
This package provides the core puzzle pieces for creating menu-type components like popups, dropdowns, and dialogs. It's designed to be composed with a positioning library (like @pras-ui/floating-kit) and an animation library (like @pras-ui/presence) to create fully-featured, interactive components.
npm install @pras-ui/menu
Here is a basic example of how to create a menu. Note that this package does not handle showing, hiding, or positioning the menu content. It is intended to be used with a presence component (like @pras-ui/presence) and a positioning component.
import React from 'react';
import {
MenuRoot,
MenuTrigger,
MenuContent,
MenuItem,
} from '@pras-ui/menu';
function MyMenu() {
const [open, setOpen] = React.useState(false);
return (
<MenuRoot open={open} onOpenChange={setOpen}>
<MenuTrigger>
<button>Open Menu</button>
</MenuTrigger>
{open && (
<MenuContent>
<MenuItem onSelect={() => alert('Copying')}>Copy</MenuItem>
<MenuItem onSelect={() => alert('Pasting')}>Paste</MenuItem>
</MenuContent>
)}
</MenuRoot>
);
}
This package exports the following headless components:
MenuItem that opens a sub-menu.MenuChoice group.MenuChoiceItem.MenuGroup.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
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.